Skip to content

Instantly share code, notes, and snippets.

@shiveshabhishek
Forked from chandankumar4/Useful commands.md
Created October 28, 2018 12:16
Show Gist options
  • Save shiveshabhishek/aed01c46a2a7a74454c47aa75f461226 to your computer and use it in GitHub Desktop.
Save shiveshabhishek/aed01c46a2a7a74454c47aa75f461226 to your computer and use it in GitHub Desktop.
Minikube and Docker

Install minikube and Docker

sudo apt-get install docker.io
sudo usermod -a -G docker $USER
reboot

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

curl -Lo minikube https://storage.googleapis.com/minikube/releases/v0.24.1/minikube-linux-amd64
chmod +x minikube
echo "source <(kubectl completion bash)" >> ~/.bashrc

sudo mv minikube /usr/local/bin/
sudo minikube start --vm-driver=none

sudo chown -R $USER $HOME/.kube
sudo chgrp -R $USER $HOME/.kube
sudo chown -R $USER $HOME/.minikube
sudo chgrp -R $USER $HOME/.minikube

kubectl get pods --all-namespaces

Uninstall minikube and Docker

minikube stop
minikube delete
docker stop $(docker ps -aq)
sudo rm -r ~/.kube ~/.minikube
sudo rm /usr/local/bin/localkube /usr/local/bin/minikube
systemctl stop '*kubelet*.mount'
sudo rm -rf /etc/kubernetes/
docker system prune -af --all
sudo apt-get purge -y docker.io
sudo apt-get autoremove -y --purge docker.io
sudo apt-get autoclean
sudo rm -rf /var/lib/docker
sudo apt-get update
sudo apt-get install -f
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment