ubuntuでkubernetesを学びたい🐳
docker, docker-composeはインストール済
$ uname -a
Linux vagrant-ubuntu-trusty-64 4.4.0-148-generic #174~14.04.1-Ubuntu SMP Thu May 9 08:17:37 UTC 2019 x86_64 x86_64 x86_64 GNU/Linux
$ docker –version
Docker version 18.06.3-ce, build d7080c1
1. kubectlインストール
2. Minikubeインストール
### kubectlのインストール
k8s公式を参考にする
install-kubectl
$ sudo apt-get update && sudo apt-get install -y apt-transport-https
$ curl -s https://packages.cloud.google.com/apt/doc/apt-key.gpg | sudo apt-key add –
$ echo “deb https://apt.kubernetes.io/ kubernetes-xenial main” | sudo tee -a /etc/apt/sources.list.d/kubernetes.list
$ sudo apt-get update
$ sudo apt-get install -y kubectl
$ kubectl version
Client Version: version.Info{Major:”1″, Minor:”17″, GitVersion:”v1.17.4″, GitCommit:”8d8aa39598534325ad77120c120a22b3a990b5ea”, GitTreeState:”clean”, BuildDate:”2020-03-12T21:03:42Z”, GoVersion:”go1.13.8″, Compiler:”gc”, Platform:”linux/amd64″}
### minikubeインストール
$ curl -Lo minikube https://storage.googleapis.com/minikube/releases/latest/minikube-linux-amd64
$ sudo chmod +x minikube
$ sudo cp minikube /usr/local/bin
$ sudo minikube start –vm-driver=none
* minikube v1.8.2 on Ubuntu 14.04 (vbox/amd64)
* Using the none driver based on user configuration
! ‘none’ driver reported an issue: exec: “systemctl”: executable file not found in $PATH
* Suggestion: Use a systemd based Linux distribution
* Documentation: https://minikube.sigs.k8s.io/docs/reference/drivers/none/
X none does not appear to be installed
あ、14.04は古いのか。サポートも終了しているみたいだし、18.04でやり直そう。。
$ vagrant ssh
Welcome to Ubuntu 18.04.4 LTS (GNU/Linux 4.15.0-91-generic x86_64)
* Documentation: https://help.ubuntu.com
* Management: https://landscape.canonical.com
* Support: https://ubuntu.com/advantage
System information as of Sat Mar 21 05:59:25 UTC 2020
System load: 0.01 Processes: 109
Usage of /: 12.3% of 9.63GB Users logged in: 0
Memory usage: 16% IP address for enp0s3: 10.0.2.15
Swap usage: 0% IP address for enp0s8: 192.168.33.10
0 packages can be updated.
0 updates are security updates.