Created
December 1, 2022 02:48
-
-
Save cbattlegear/316e6d5cbaf81283562bf6c1cad8a02d to your computer and use it in GitHub Desktop.
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 | |
sudo snap remove docker | |
sudo apt update && sudo apt install -y apt-transport-https ca-certificates curl gnupg-agent software-properties-common gnupg2 | |
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | gpg --dearmor | sudo tee /etc/apt/trusted.gpg.d/docker.gpg | |
sudo add-apt-repository -y "deb [arch=amd64] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable" | |
sudo apt update | |
sudo apt install -y docker-ce docker-ce-cli containerd.io | |
sudo groupadd docker | |
sudo usermod -aG docker $USER | |
echo "{ \ | |
\"exec-opts\": [\"native.cgroupdriver=systemd\"], \ | |
\"log-driver\": \"json-file\", \ | |
\"log-opts\": { \ | |
\"max-size\": \"100m\" \ | |
}, \ | |
\"storage-driver\": \"overlay2\" \ | |
}" | sudo tee /etc/docker/daemon.json | |
sudo systemctl restart docker | |
sudo containerd config default | sudo tee /etc/containerd/config.toml | |
sudo sed -i "/ SystemdCgroup = false/c\\ SystemdCgroup = true" /etc/containerd/config.toml | |
sudo systemctl restart containerd | |
sudo systemctl enable containerd | |
curl -s https://packages.cloud.google.com/apt/doc/apt-key.gpg | gpg --dearmor | sudo tee /etc/apt/trusted.gpg.d/kubernetes.gpg | |
echo "deb https://apt.kubernetes.io/ kubernetes-xenial main" | sudo tee -a /etc/apt/sources.list.d/kubernetes.list | |
sudo apt update && sudo apt install -y kubectl kubeadm | |
sudo kubeadm config images pull | |
sudo swapoff -a | |
sudo sed -i "/swap/s/^/# /g" /etc/fstab |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment