- docker가 없어도 k8s를 올릴 수 있다!
# 먼저 설치하여 환경파일을 가져오고 원하는 버전을 설치한다.
sudo apt-get install containerd -y
sudo mkdir -p /etc/containerd
containerd config default | sudo tee /etc/containerd/config.toml
sudo systemctl stop containerd
curl -LO https://github.com/containerd/containerd/releases/download/v1.4.4/containerd-1.4.4-linux-amd64.tar.gz
tar xvf containerd-1.4.4-linux-amd64.tar.gz
rm containerd-1.4.4-linux-amd64.tar.gz
sudo cp bin/* /usr/bin/
sudo systemctl start containerd
rm -rf bin
sudo systemctl status containerd --lines 1
# k8s 설치시작
curl -s https://packages.cloud.google.com/apt/doc/apt-key.gpg | sudo apt-key add
sudo apt-add-repository "deb http://apt.kubernetes.io/ kubernetes-xenial main"
sudo apt-get install kubeadm kubelet kubectl -y
sudo apt-mark hold kubeadm kubelet kubectl containerd
#echo 'net.bridge.bridge-nf-call-iptables = 1' | sudo tee -a /etc/sysctl.conf
SOURCE_FILE="/etc/sysctl.conf"
LINE_INPUT="net.bridge.bridge-nf-call-iptables = 1"
grep -qF "$LINE_INPUT" "$SOURCE_FILE" || echo "$LINE_INPUT" | sudo tee -a "$SOURCE_FILE"
sudo echo '1' | sudo tee /proc/sys/net/ipv4/ip_forward
cat /proc/sys/net/ipv4/ip_forward
sudo sysctl --system
sudo modprobe overlay
sudo modprobe br_netfilter
sudo swapoff -a
sudo sed -ri '/\sswap\s/s/^#?/#/' /etc/fstab
cat /etc/fstab
약 4 분