I started working with Kubernetes and I recognized that Kubernetes (K8s) is powerful but also very complex.
My attitude with new softeware is:
- Read about it
- Try it out to get a “feeling” what is possible.
Let me share my experience with you in the next steps…
Minikube (“local Kubernetes”)
The fastest way to start with K8s is “Minikube”. Minikube is dedicated to “play around” but not for productive installations.
Available informations are here and here.
Mac OS
- brew cask install minikube
- brew install kubectl
- kubectl cluster-info
- minikube start –vm-driver=vmwarefusion
- kubectl run hello-minikube –image=gcr.io/google_containers/echoserver:1.4 –port=8080
- kubectl expose deployment hello-minikube –type=NodePort
- kubectl get pod
- curl $(minikube service hello-minikube –url)
- minikube dashboard
Linux (Ubuntu 17.10)
Because of problems with VirtualBox I installed KVM. Also Docker needed an update.
Install KVM
- sudo apt-get install qemu-kvm libvirt-bin ubuntu-vm-builder bridge-utils
- curl -LO https://github.com/dhiltgen/docker-machine-kvm/releases/download/v0.10.0/docker-machine-driver-kvm-ubuntu16.04
- cp docker-machine-driver-kvm-ubuntu16.04 /usr/local/bin/docker-machine-driver-kvm
- chmod +x /usr/local/bin/docker-machine-driver-kvm
Install kubectl
curl -LO https://storage.googleapis.com/kubernetes-release/release/$(curl -s https://storage.googleapis.com/kubernetes-release/release/stable.txt)/bin/linux/amd64/kubectl
chmod +x ./kubectl
sudo mv ./kubectl /usr/local/bin/kubectl
Install minikube
curl -Lo minikube https://storage.googleapis.com/minikube/releases/v0.23.0/minikube-linux-amd64 && chmod +x minikube && sudo mv minikube /usr/local/bin/
Update Docker at your Ubuntu 17.10 with
- sudo vi /etc/apt/sources.list and change/insert the following lines
deb [arch=amd64] https://download.docker.com/linux/ubuntu zesty stable
# deb-src [arch=amd64] https://download.docker.com/linux/ubuntu zesty stable
2. Add the Docker GPG Key and install Docker CE
$ sudo curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -
sudo apt-get update
sudo apt-get install docker-ce
sudo groupadd docker
sudo usermod -aG docker $USER
Start and use minikube
- minikube start –vm-driver=kvm
- kubectl run hello-minikube –image=gcr.io/google_containers/echoserver:1.4 –port=8080
- kubectl expose deployment hello-minikube –type=NodePort
- curl $(minikube service hello-minikube –url)
- minikube dashboard
- kubectl proxy
Details will follow…