Last active
May 29, 2021 00:08
-
-
Save Ne00n/65cbd2b6ffa1eb3cec9fbe6998e3f9ed 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
#kubernetes | |
sudo apt update | |
sudo apt -y install curl apt-transport-https | |
curl -s https://packages.cloud.google.com/apt/doc/apt-key.gpg | sudo apt-key add - | |
echo "deb https://apt.kubernetes.io/ kubernetes-xenial main" | sudo tee /etc/apt/sources.list.d/kubernetes.list | |
sudo apt update | |
sudo apt -y install vim git curl wget kubelet kubeadm kubectl | |
sudo apt-mark hold kubelet kubeadm kubectl | |
#sysctl | |
sudo modprobe overlay | |
sudo modprobe br_netfilter | |
cat <<EOF | sudo tee /etc/modules-load.d/k8s.conf | |
br_netfilter | |
EOF | |
sudo tee /etc/sysctl.d/kubernetes.conf<<EOF | |
net.bridge.bridge-nf-call-ip6tables = 1 | |
net.bridge.bridge-nf-call-iptables = 1 | |
net.ipv4.ip_forward = 1 | |
EOF | |
sudo sysctl --system | |
#Runtime | |
sudo apt update | |
sudo apt install -y curl gnupg2 software-properties-common apt-transport-https ca-certificates | |
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add - | |
sudo add-apt-repository "deb [arch=arm64] https://download.docker.com/linux/ubuntu focal stable" | |
sudo apt update | |
sudo apt install -y containerd.io docker-ce docker-ce-cli | |
# Create required directories | |
sudo mkdir -p /etc/systemd/system/docker.service.d | |
# Create daemon json config file | |
sudo tee /etc/docker/daemon.json <<EOF | |
{ | |
"exec-opts": ["native.cgroupdriver=systemd"], | |
"log-driver": "json-file", | |
"log-opts": { | |
"max-size": "100m" | |
}, | |
"storage-driver": "overlay2" | |
} | |
EOF | |
# Start and enable Services | |
sudo systemctl daemon-reload | |
sudo systemctl restart docker | |
sudo systemctl enable docker |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment