March 11, 2019
If you have been involved in building web applications or worked as a DevOps, you must have heard about kubernetes or k8s (8 replacing the 8 characters between k and s). The fastest way to get up and running with k8s, is to use minikube to run k8s locally. If you are keen to learn new technologies, pluralsight is definitely a nice resource to check. They recently offered access to all their high level content for free for a weekend, and I took advantage of that and learned the basics of kubernetes.
deploy applications on k8s.
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
echo "deb https://apt.kubernetes.io/ kubernetes-xenial main" | sudo tee -a /etc/apt/sources.list.d/kubernetes.list
kubectl version --client
curl -Lo minikube https://storage.googleapis.com/minikube/releases/latest/minikube-linux-amd64 \
&& chmod +x minikube && sudo cp minikube /usr/local/bin && rm minikube
minikube version
to specify vmdriver as none using the —vm-driver flag. This runs k8s components on the host, and not the VM.
minikube start --vm-driver=none
Resulting in this output
💣 Failed to update cluster: downloading binaries: copy: error creating file at /usr/bin/kubeadm: open /usr/bin/kubeadm: permission denied
Passing most of the the environment variables, and running as root (sudo -E, the E flag passes the user environment variables to root), made it go a bit further, but minikube crashed again
Waiting for pods: apiserver proxy💣 Error restarting cluster: wait: waiting for k8s-app=kube-proxy: timed out waiting for the condition
curl -LO https://storage.googleapis.com/minikube/releases/v0.34.1/minikube-linux-amd64 && sudo install minikube-linux-amd64 /usr/local/bin/minikube
CHANGE_MINIKUBE_NONE_USER=true sudo -E minikube start --vm-driver none
Welcome to the personal blog of Ankit D Mohapatra.
I am the CTO of Trias Technology Group.
Follow me on twitter