how to configure minikube

  • install kubectl
sudo apt-get update && sudo apt-get install -y apt-transport-https
curl -s | sudo apt-key add -
echo "deb kubernetes-xenial main" | sudo tee -a /etc/apt/sources.list.d/kubernetes.list
sudo apt-get update
sudo apt-get install -y kubectl

install kubectl binary using native package

  • install minikube
curl -Lo minikube && chmod +x minikube && sudo cp minikube /usr/local/bin/ && rm minikube
kubectl cluster-info [dump]

find the latest version of minikube

  • start minikube cluster
curl -L
chmod +x docker-machine-driver-kvm
sudo mv docker-machine-driver-kvm /usr/local/bin/docker-machine-driver-kvm
minikube start --vm-driver=kvm
minikube ip
kubectl create deployment hello-node --port=8080
kubectl get deployments
kubectl get pods
kubectl get events
kubectl config view
kubectl expose deployment hello-node --type=LoadBalancer
kubectl get services
kubectl get pods,services -n kube-system
minikube service hello-node
curl $(minikube service hello-node --url)
minikube addons list
minikube addons enable dashboard
minikube dashboard
kubectl delete services hello-node
kubectl delete deployment hello-node
minikube stop
minikube delete

the default VM driver seems VirtualBox.
so if you want to change the VM driver, download the appropriate one and add –vm-driver=xxx flag to minikube start.
minikube start --vm-driver=kvm


Leave a Reply

Your email address will not be published. Required fields are marked *