在三台主機做Kubernetes Cluster的情境下
(Version = 1.18.3)
192.168.53.204 k8s-master ---CentOS 7.8
192.168.53.205 k8s-node1 ---CentOS 7.8
192.168.53.206 k8s-node2 ---CentOS 7.8
#先從k8s-master 安裝CRI-O
1.開啟模組
modprobe overlay
modprobe br_netfilter
2.新增sysctl配置
cat <<EOF | sudo tee /etc/sysctl.d/99-kubernetes-cri.conf
net.bridge.bridge-nf-call-iptables = 1
net.ipv4.ip_forward = 1
net.bridge.bridge-nf-call-ip6tables = 1
EOF
sysctl --system
3.加入CRI-O Repo (1.18.3) & 安裝 CRI-O
curl -L -o /etc/yum.repos.d/devel:kubic:libcontainers:stable.repo https://download.opensuse.org/repositories/devel:/kubic:/libcontainers:/stable/CentOS_7/devel:kubic:libcontainers:stable.repo
curl -L -o /etc/yum.repos.d/devel:kubic:libcontainers:stable:cri-o:1.18:1.18.3.repo https://download.opensuse.org/repositories/devel:kubic:libcontainers:stable:cri-o:1.18:1.18.3/CentOS_7/devel:kubic:libcontainers:stable:cri-o:1.18:1.18.3.repo
yum install cri-o
4. 開啟服務
systemctl enable crio
systemctl start crio
參考文件:
https://kubernetes.io/docs/setup/production-environment/container-runtimes/
沒有留言:
張貼留言