**8.**kubernetes 服务
任务描述:请采用 kubernetes 和 containerd,管理容器。
在 linux5-linux7 上安装 containerd 和 kubernetes,linux5 作为
master node , linux6 和 linux7 作 为 work node ; 使 用
containerd.sock 作 为 容 器 runtime-endpoint 。 pod 网 络 为
10.244.0.0/16,services 网络为 10.96.0.0/16。
master 节点配置 calico 作为网络组件。
导入 nginx.tar 镜像,主页内容为“HelloKubernetes”。用该镜像创
建一个名称为 web 的 deployment,副本数为 2;为该 deployment 创
建一个类型为 nodeport 的 service,port 为 80,targetPort 为 80,
nodePort 为 30000。
#5-7都要做
#安装k8s以及containerd
unzip kubernetes.zip
yum -y install iproute*
yum -y localinstall kubernetes/packages/*
#关闭swap
swapoff -a