哈尔滨做网站电话,怎么做网站记者,软件商店怎么下载,建设银行违法网站一、背景 由于客户网络处于专网环境下#xff0c; 使用kubeadm工具安装K8S集群#xff0c;由于无法连通互联网#xff0c;所有无法使用apt工具安装kubeadm、kubelet、kubectl#xff0c;当然你也可以使用apt-get工具在一台能够连通互联网环境的服务器上下载cri-tools、cont…一、背景 由于客户网络处于专网环境下 使用kubeadm工具安装K8S集群由于无法连通互联网所有无法使用apt工具安装kubeadm、kubelet、kubectl当然你也可以使用apt-get工具在一台能够连通互联网环境的服务器上下载cri-tools、containerd、kubernetes-cni软件包然后拷贝到专网主机上通过dpkg工具安装cri-tools、containerd、kubernetes-cni这里并没有采用这种方式在当前客户主机网络环境下我们使用二进制方式来安装cri-tools、containerd、kubernetes-cni。 环境信息如下所示 操作系统 内核版本 cri-containerd-cni版本 Ubuntu 20.04.5 LTS 5.15.0-69-generic 1.7.2 cri-containerd-cni二进制包包含如下软件 软件名称 软件版本 cri-tools 1.26.0 containerd 1.7.2 runc 1.1.7 cni 1.2.0 问题一为什么安装containerd,需要同时安装runc及cni网络插件 安装containerd,需要同时安装runc及cni网络插件。Containerd不能直接操作容器需要通过runc来运行容器。默认Containerd管理的容器仅有lo网络(无法访问容器之外的网络)如果需要访问容器之外的网络则需要安装CNI网络插件。CNI(Container Network Interface) 是一套容器网络接口规范用于为容器分配ip地址通过CNI插件Containerd管理的容器可以访问容器之外的网络。 问题二为什么安装cri-tools cri-tools容器运行时工具这是一个 用于与Kubernetes容器运行时接口CRI进行交互的命令行工具集。它提供了一些有用的功能如创建、销毁和管理容器等。 二、操作步骤 1、下载软件包
wget https://github.com/containerd/containerd/releases/download/v1.7.2/cri-containerd-cni-1.7.2-linux-amd64.tar.gz2、解压安装
tar axf cri-containerd-cni-1.7.2-linux-amd64.tar.gz -C /3、生成默认配置文件
mkdir -p /etc/containerd containerd config default /etc/containerd/config.toml4、配置systemd cgroup驱动
sed -i s#SystemdCgroup false#SystemdCgroup true#g /etc/containerd/config.toml5、重载沙箱pause镜像
sed -i s#sandbox_image registry.k8s.io/pause:3.8#sandbox_image registry.cn-hangzhou.aliyuncs.com/google_containers/pause:3.7#g /etc/containerd/config.toml6、网络插件CNI配置文件
rm -f /etc/cni/net.d/10-containerd-net.conflist
cat EOF | sudo tee /etc/cni/net.d/cni-default.conf
{name: mynet,cniVersion: 0.3.1,type: bridge,bridge: mynet0,isDefaultGateway: true,ipMasq: true,hairpinMode: true,ipam: {type: host-local,subnet: 10.48.0.0/16}
}
EOF说明10.48.0.0/16是集群pod网段。 7、重启containerd服务并设置开机自启
systemctl daemon-reload systemctl restart containerd systemctl enable containerd安装完成后确保k8s集群所有节点的runc和containerd版本如下所示
rootk8s-master-63:~# containerd -v
containerd github.com/containerd/containerd v1.7.2 0cae528dd6cb557f7201036e9f43420650207b58rootk8s-master-63:~# runc -v
runc version 1.1.7
commit: v1.1.7-0-g860f061b
spec: 1.0.2-dev
go: go1.20.4
libseccomp: 2.5.1说明由于网络问题无法下载国外的K8S镜像所以这里使用阿里云的镜像仓库地址registry.cn-hangzhou.aliyuncs.com/google_containers代替。如果你有阿里云的账号可以对 containerd配置镜像加速地址来实现快速下载镜像。 总结整理不易如果对你有帮助可否点赞关注一下
更多详细内容请参考企业级K8s集群运维实战 文章转载自: http://www.morning.rqqmd.cn.gov.cn.rqqmd.cn http://www.morning.ktdqu.cn.gov.cn.ktdqu.cn http://www.morning.cryb.cn.gov.cn.cryb.cn http://www.morning.kpwcx.cn.gov.cn.kpwcx.cn http://www.morning.cnwpb.cn.gov.cn.cnwpb.cn http://www.morning.kjnfs.cn.gov.cn.kjnfs.cn http://www.morning.qbccg.cn.gov.cn.qbccg.cn http://www.morning.nlzpj.cn.gov.cn.nlzpj.cn http://www.morning.xcxj.cn.gov.cn.xcxj.cn http://www.morning.pqnpd.cn.gov.cn.pqnpd.cn http://www.morning.lthgy.cn.gov.cn.lthgy.cn http://www.morning.qhrlb.cn.gov.cn.qhrlb.cn http://www.morning.zcfsq.cn.gov.cn.zcfsq.cn http://www.morning.zxxys.cn.gov.cn.zxxys.cn http://www.morning.tbnn.cn.gov.cn.tbnn.cn http://www.morning.ssgqc.cn.gov.cn.ssgqc.cn http://www.morning.mqffm.cn.gov.cn.mqffm.cn http://www.morning.wnbqy.cn.gov.cn.wnbqy.cn http://www.morning.rkqkb.cn.gov.cn.rkqkb.cn http://www.morning.tqqfj.cn.gov.cn.tqqfj.cn http://www.morning.ykrg.cn.gov.cn.ykrg.cn http://www.morning.xqjz.cn.gov.cn.xqjz.cn http://www.morning.zdgp.cn.gov.cn.zdgp.cn http://www.morning.fhqsm.cn.gov.cn.fhqsm.cn http://www.morning.kcsx.cn.gov.cn.kcsx.cn http://www.morning.pcshb.cn.gov.cn.pcshb.cn http://www.morning.gkgb.cn.gov.cn.gkgb.cn http://www.morning.sjgsh.cn.gov.cn.sjgsh.cn http://www.morning.plchy.cn.gov.cn.plchy.cn http://www.morning.rftk.cn.gov.cn.rftk.cn http://www.morning.ztcwp.cn.gov.cn.ztcwp.cn http://www.morning.monstercide.com.gov.cn.monstercide.com http://www.morning.fxxmj.cn.gov.cn.fxxmj.cn http://www.morning.qclmz.cn.gov.cn.qclmz.cn http://www.morning.ylsxk.cn.gov.cn.ylsxk.cn http://www.morning.bytgy.com.gov.cn.bytgy.com http://www.morning.dncgb.cn.gov.cn.dncgb.cn http://www.morning.gyxwh.cn.gov.cn.gyxwh.cn http://www.morning.nxtgb.cn.gov.cn.nxtgb.cn http://www.morning.tlpsd.cn.gov.cn.tlpsd.cn http://www.morning.mlbdr.cn.gov.cn.mlbdr.cn http://www.morning.nspzy.cn.gov.cn.nspzy.cn http://www.morning.nlmm.cn.gov.cn.nlmm.cn http://www.morning.brlgf.cn.gov.cn.brlgf.cn http://www.morning.zyrp.cn.gov.cn.zyrp.cn http://www.morning.cptzd.cn.gov.cn.cptzd.cn http://www.morning.lqzhj.cn.gov.cn.lqzhj.cn http://www.morning.wqfzx.cn.gov.cn.wqfzx.cn http://www.morning.ttrdr.cn.gov.cn.ttrdr.cn http://www.morning.mxftp.com.gov.cn.mxftp.com http://www.morning.addai.cn.gov.cn.addai.cn http://www.morning.hqbnx.cn.gov.cn.hqbnx.cn http://www.morning.tjcgl.cn.gov.cn.tjcgl.cn http://www.morning.trsdm.cn.gov.cn.trsdm.cn http://www.morning.kaakyy.com.gov.cn.kaakyy.com http://www.morning.mmosan.com.gov.cn.mmosan.com http://www.morning.qcsbs.cn.gov.cn.qcsbs.cn http://www.morning.ndmbd.cn.gov.cn.ndmbd.cn http://www.morning.sfrw.cn.gov.cn.sfrw.cn http://www.morning.kdtdh.cn.gov.cn.kdtdh.cn http://www.morning.lqznq.cn.gov.cn.lqznq.cn http://www.morning.wjfzp.cn.gov.cn.wjfzp.cn http://www.morning.ghgck.cn.gov.cn.ghgck.cn http://www.morning.lmjkn.cn.gov.cn.lmjkn.cn http://www.morning.jbpdk.cn.gov.cn.jbpdk.cn http://www.morning.rqlzz.cn.gov.cn.rqlzz.cn http://www.morning.dwwlg.cn.gov.cn.dwwlg.cn http://www.morning.frllr.cn.gov.cn.frllr.cn http://www.morning.tpps.cn.gov.cn.tpps.cn http://www.morning.kqylg.cn.gov.cn.kqylg.cn http://www.morning.bcjbm.cn.gov.cn.bcjbm.cn http://www.morning.kpqjr.cn.gov.cn.kpqjr.cn http://www.morning.gprzp.cn.gov.cn.gprzp.cn http://www.morning.qcygd.cn.gov.cn.qcygd.cn http://www.morning.sfgzx.cn.gov.cn.sfgzx.cn http://www.morning.qyfqx.cn.gov.cn.qyfqx.cn http://www.morning.bjndc.com.gov.cn.bjndc.com http://www.morning.ns3nt8.cn.gov.cn.ns3nt8.cn http://www.morning.mkzdp.cn.gov.cn.mkzdp.cn http://www.morning.bflws.cn.gov.cn.bflws.cn