目录
ctr image pull docker.io/library/redis:7.2 ctr image pull docker.io/ankane/pgvector:latest ctr image pull docker.io/library/rabbitmq:3.13 sudo ctr image import image.tar #导入docker镜像
sudo ctr image list #显示镜像列表
sudo ctr containers list #列出容器列表
CRI(容器运行时接口)兼容的容器运行时(如CRIO)
sudo crictl images
要在 CRIO 中导入 Docker 镜像,您可以使用以下步骤:
crictl image import /path/to/image.tar
#安装containerd容器运行时 wget https://github.com/containerd/nerdctl/releases/download/v1.7.6/nerdctl-1.7.6-linux-amd64.tar.gz tar Cxzvvf /usr/local/bin nerdctl-1.7.6-linux-amd64.tar.gz nerdctl -n k8s.io images |grep -v none #查看镜像 export VIP=192.168.215.200 # vip地址 export INTERFACE=ens33 export KVVERSION=v0.8.0 alias kube-vip="ctr image pull ghcr.io/kube-vip/kube-vip:$KVVERSION; ctr run --rm --net-host ghcr.io/kube-vip/kube-vip:$KVVERSION vip /kube-vip" kube-vip manifest pod \ --interface $INTERFACE \ --address $VIP \ --controlplane \ --services \ --arp \ --leaderElection | tee /etc/kubernetes/manifests/kube-vip.yaml kubeadm init --control-plane-endpoint=192.168.215.200:6443 --kubernetes-version=v1.28.2 --pod-network-cidr=10.244.0.0/16 --service-cidr=10.96.0.0/12 --image-repository=registry.aliyuncs.com/google_containers --upload-certs cp -i /etc/kubernetes/admin.conf $HOME/.kube/config #删除nod1节点命令 kubectl cordon node1 kubectl drain node1 --ignore-daemonsets kubectl delete node node1