yum update -y && yum install -y unzip tar btrfs-progs libseccomp socat util-linux curl wget
wget https://github.com/containerd/containerd/releases/download/v1.3.0/containerd-1.3.0.linux-amd64.tar.gz && tar xf containerd-1.3.0.linux-amd64.tar.gz -C /usr/local
wget -O /usr/local/sbin/runc https://github.com/opencontainers/runc/releases/download/v1.0.0-rc8/runc.amd64 && chmod 755 /usr/local/sbin/runc
containerd --version && runc --version
mkdir /etc/containerd
cat <<EOF > /etc/containerd/config.toml [plugins.cri.containerd] snapshotter = "native" EOF
curl -o /etc/systemd/system/containerd.service https://raw.githubusercontent.com/containerd/cri/master/contrib/systemd-units/containerd.service systemctl daemon-reload systemctl enable containerd systemctl start containerd systemctl status containerd
cat <<EOF > /etc/yum.repos.d/kubernetes.repo [kubernetes] name=Kubernetes baseurl=https://packages.cloud.google.com/yum/repos/kubernetes-el7-x86_64 enabled=1 gpgcheck=1 repo_gpgcheck=1 gpgkey=https://packages.cloud.google.com/yum/doc/yum-key.gpg https://packages.cloud.google.com/yum/doc/rpm-package-key.gpg EOF
yum install -y cri-tools ebtables ethtool kubeadm kubectl kubelet kubernetes-cni
systemctl enable kubelet.service kubeadm config images pull modprobe br_netfilter sysctl net.bridge.bridge-nf-call-iptables=1 sysctl net.ipv4.ip_forward=1 swapoff -a
yum install container-selinux
kubeadm init --ignore-preflight-errors=all --cri-socket /run/containerd/containerd.sock --pod-network-cidr=192.168.0.0/16
mkdir -p $HOME/.kube cp -i /etc/kubernetes/admin.conf $HOME/.kube/config chown $(id -u):$(id -g) $HOME/.kube/config
kubectl apply -f \ https://docs.projectcalico.org/v3.10/manifests/calico.yaml