-
-
Save dfang/f9db30b562ba65f0e9ddcd098deda33c to your computer and use it in GitHub Desktop.
Install minikube on Debian / Ubuntu
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/sh | |
| # install needed curl package | |
| sudo apt install --no-install-recommends curl -y | |
| # install kubectl | |
| curl -Lo /tmp/kubectl https://storage.googleapis.com/kubernetes-release/release/$(curl -s https://storage.googleapis.com/kubernetes-release/release/stable.txt)/bin/linux/amd64/kubectl && \ | |
| chmod +x /tmp/kubectl && \ | |
| sudo mv /tmp/kubectl /usr/local/bin/kubectl | |
| # kubectl tab completion | |
| sudo sh -c 'echo "source <(kubectl completion bash)" > /etc/bash_completion.d/kubectl' | |
| # install needed packages for kvm (see https://github.com/kubernetes/minikube/blob/master/docs/drivers.md#kvm2-driver) | |
| sudo apt install --no-install-recommends curl libvirt-bin qemu-kvm -y | |
| sudo usermod -a -G libvirtd $(whoami) | |
| newgrp libvirtd | |
| # download and install the kvm docker machine driver | |
| curl -Lo /tmp/docker-machine-driver-kvm2 https://storage.googleapis.com/minikube/releases/latest/docker-machine-driver-kvm2 && \ | |
| chmod +x /tmp/docker-machine-driver-kvm2 && \ | |
| sudo mv /tmp/docker-machine-driver-kvm2 /usr/bin/ | |
| # install minikube | |
| curl -Lo /tmp/minikube https://storage.googleapis.com/minikube/releases/latest/minikube-linux-amd64 && \ | |
| chmod +x /tmp/minikube && \ | |
| sudo mv /tmp/minikube /usr/local/bin/minikube | |
| minikube start --vm-driver=kvm2 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/sh | |
| # install needed | |
| sudo apt-get install curl -y | |
| # install kubectl | |
| curl -Lo /tmp/kubectl https://storage.googleapis.com/kubernetes-release/release/$(curl -s https://storage.googleapis.com/kubernetes-release/release/stable.txt)/bin/linux/amd64/kubectl && \ | |
| chmod +x /tmp/kubectl && \ | |
| sudo mv /tmp/kubectl /usr/local/bin/kubectl | |
| # kubectl tab completion | |
| sudo sh -c 'echo "source <(kubectl completion bash)" >> /etc/bash_completion.d/kubectl' | |
| # install minikube | |
| curl -Lo /tmp/minikube https://storage.googleapis.com/minikube/releases/latest/minikube-linux-amd64 && \ | |
| chmod +x /tmp/minikube && \ | |
| sudo mv /tmp/minikube /usr/local/bin/minikube | |
| # be lazy and use UNSECURE vm driver "none" | |
| export MINIKUBE_WANTUPDATENOTIFICATION=false | |
| export MINIKUBE_WANTREPORTERRORPROMPT=false | |
| export MINIKUBE_HOME=$HOME | |
| export CHANGE_MINIKUBE_NONE_USER=true | |
| mkdir -p $HOME/.kube || true | |
| touch $HOME/.kube/config | |
| export KUBECONFIG=$HOME/.kube/config | |
| sudo minikube start --vm-driver=none |
Author
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
https://github.com/kubernetes/minikube/blob/master/docs/drivers.md#kvm2-driver