Skip to content

Instantly share code, notes, and snippets.

@chandankumar4
Last active May 26, 2019 06:54
Show Gist options
  • Save chandankumar4/b80b96659bd89df55bdcb4f616bc1fef to your computer and use it in GitHub Desktop.
Save chandankumar4/b80b96659bd89df55bdcb4f616bc1fef 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

Format usb drive

sudo su
fdisk -l 
umount /dev/sdxx
mkdosfs -F 32 -I /dev/sdxx

Free port in ubuntu

sudo netstat -lpn |grep :8080 // kill the process

Tmux command

synchronise shell

Ctrl-B : setw synchronize-panes on

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment