Created
October 17, 2023 06:58
-
-
Save danpawlik/88b9818f1a9ff6f1fac11122dfb48c05 to your computer and use it in GitHub Desktop.
Install minikube with a podman driver
This file contains 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/bash | |
MINIKUBE_VERSION=${MINIKUBE_VERSION:-'latest'} | |
echo "$USER ALL=(ALL) ALL" | sudo tee -a /etc/sudoers | |
echo "%$USER ALL=(ALL) NOPASSWD: ALL" | sudo tee -a /etc/sudoers | |
# install crio | |
CRIO_VERSION=1.24 | |
OS="xUbuntu_$(lsb_release -r -s)" | |
echo "deb [trusted=true] https://download.opensuse.org/repositories/devel:/kubic:/libcontainers:/stable/$OS/ /"|sudo tee /etc/apt/sources.list.d/devel:kubic:libcontainers:stable.list | |
echo "deb [trusted=true] http://download.opensuse.org/repositories/devel:/kubic:/libcontainers:/stable:/cri-o:/$CRIO_VERSION/$OS/ /"|sudo tee /etc/apt/sources.list.d/devel:kubic:libcontainers:stable:cri-o:$CRIO_VERSION.list | |
sudo mkdir -p /etc/apt/keyrings | |
curl -fsSL "https://download.opensuse.org/repositories/devel:kubic:libcontainers:unstable/xUbuntu_$(lsb_release -rs)/Release.key" \ | |
| gpg --dearmor \ | |
| sudo tee /etc/apt/keyrings/devel_kubic_libcontainers_unstable.gpg > /dev/null | |
echo \ | |
"deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/devel_kubic_libcontainers_unstable.gpg]\ | |
https://download.opensuse.org/repositories/devel:kubic:libcontainers:unstable/xUbuntu_$(lsb_release -rs)/ /" \ | |
| sudo tee /etc/apt/sources.list.d/devel:kubic:libcontainers:unstable.list > /dev/null | |
sudo apt-get update -qq | |
sudo apt update | |
sudo apt install -y cri-o cri-o-runc conntrack containernetworking-plugins cri-tools podman | |
curl -LO "https://storage.googleapis.com/minikube/releases/$MINIKUBE_VERSION/minikube-linux-amd64" | |
sudo install minikube-linux-amd64 /usr/local/bin/minikube | |
ln -s /usr/local/bin/minikube /tmp/minikube | |
# NON ROOT USER!!! | |
# minikube start --driver=podman --container-runtime=cri-o | |
export MINIKUBE_WANTUPDATENOTIFICATION=false; | |
export MINIKUBE_WANTREPORTERRORPROMPT=false; | |
export MINIKUBE_WANTNONEDRIVERWARNING=false; | |
export MINIKUBE_WANTKUBECTLDOWNLOADMSG=false; | |
export CHANGE_MINIKUBE_NONE_USER=true; | |
export MINIKUBE_HOME="/home/ubuntu"; | |
export KUBECONFIG="/home/ubuntu/.kube/config"; | |
/tmp/minikube start \ | |
--v=7 \ | |
--vm-driver=podman \ | |
--container-runtime=cri-o \ | |
--addons=ingress \ | |
--addons=ingress-dns \ | |
--addons=dns \ | |
--addons=storage \ | |
--network-plugin=cni |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment