1、废弃docker引擎
systemctl enable kubelet systemctl enable containerd cat <<EOF | sudo tee /etc/modules-load.d/k8s.conf overlay br_netfilter EOF cat /etc/modules-load.d/k8s.conf modprobe overlay modprobe br_netfilter mv /etc/sysctl.d/k8s.conf /etc/sysctl.d/k8s.conf-bak cat <<EOF | sudo tee /etc/sysctl.d/k8s.conf net.bridge.bridge-nf-call-iptables = 1 net.bridge.bridge-nf-call-ip6tables = 1 net.ipv4.ip_forward = 1 EOF cat /etc/sysctl.d/k8s.conf sysctl --system lsmod | grep br_netfilter lsmod | grep overlay sysctl net.bridge.bridge-nf-call-iptables net.bridge.bridge-nf-call-ip6tables net.ipv4.ip_forward cd /etc/containerd/ mv config.toml config.toml-bak containerd config default > /etc/containerd/config.toml ls vim /etc/containerd/config.toml 2 root = "/data/containerd" 57 sandbox_image = "fat.harbor.bjshxg.com/kubernetes/pause:3.6" 102 [plugins."io.containerd.grpc.v1.cri".registry] 103 [plugins."io.containerd.grpc.v1.cri".registry.mirrors] 104 [plugins."io.containerd.grpc.v1.cri".registry.mirrors."docker.io"] 105 endpoint = ["https://registry-1.docker.io"] 106 [plugins."io.containerd.grpc.v1.cri".registry.mirrors."fat.harbor.bjshxg.com"] 107 endpoint = ["http://fat.harbor.bjshxg.com"] 108 [plugins."io.containerd.grpc.v1.cri".registry.mirrors."skg.harbor.bjshxg.com"] 109 endpoint = ["http://skg.harbor.bjshxg.com"] 110 [plugins."io.containerd.grpc.v1.cri".registry.configs] 111 [plugins."io.containerd.grpc.v1.cri".registry.configs."fat.harbor.bjshxg.com".tls] 112 insecure_skip_verify = true 113 [plugins."io.containerd.grpc.v1.cri".registry.configs."fat.harbor.bjshxg.com".auth] 114 username = "admin" 115 password = "K!rOLRknyWxv%P8R" 116 [plugins."io.containerd.grpc.v1.cri".registry.configs."skg.harbor.bjshxg.com".tls] 117 insecure_skip_verify = true 118 [plugins."io.containerd.grpc.v1.cri".registry.configs."skg.harbor.bjshxg.com".auth] 119 username = "admin" 120 password = "K!rOLRknyWxv%P8R" vim /etc/sysconfig/kubelet KUBELET_EXTRA_ARGS="--container-runtime=remote --container-runtime-endpoint=unix:///run/containerd/containerd.sock" mkdir /data/containerd systemctl daemon-reload systemctl restart containerd systemctl restart kubelet
ctr -n=k8s.io image import kube-proxy-v1.23.14.tar
ctr -n=k8s.io image import k8s-v1.23.14.tar
2、安装crictl工具
VERSION="v1.22.0" wget https://github.com/kubernetes-sigs/cri-tools/releases/download/$VERSION/crictl-$VERSION-linux-amd64.tar.gz tar zxvf crictl-$VERSION-linux-amd64.tar.gz -C /usr/local/bin ls /usr/local/bin/crictl ln -sf /usr/local/bin/crictl /usr/sbin/crictl ls /usr/sbin/crictl ln -sf /usr/local/bin/crictl /usr/bin/crictl ls /usr/bin/crictl vim /etc/crictl.yaml runtime-endpoint: unix:///var/run/containerd/containerd.sock image-endpoint: unix:///var/run/containerd/containerd.sock debug: false pull-image-on-create: false disable-pull-on-run: false crictl version crictl pods systemctl daemon-reexec systemctl restart containerd.service
标签:cri,grpc,containerd,crictl,io,docker,k8s,废弃,registry From: https://www.cnblogs.com/linjiangCN/p/17817952.html