Rke2安装的集群怎么查看服务器上的镜像

环境信息:
RKE2 版本:
rke2 version v1.24.11+rke2r1 (23bdc987de9658eb80a5e03862ab34efdecf6d4e)
go version go1.19.6 X:boringcrypto

节点 CPU 架构,操作系统和版本:
Linux iZwz9hifjgcz508mj7fsqcZ 5.4.0-125-generic #141-Ubuntu SMP Wed Aug 10 13:42:03 UTC 2022 x86_64 x86_64 x86_64 GNU/Linux

集群配置:
3 servers

问题描述:
怎么查看服务器上的镜像

重现步骤:
ln -s /var/lib/rancher/rke2/bin/ctr /usr/bin/ctr
ctr -n k8s.io image ls

预期结果:
看到当前服务器节点所有镜像

实际结果:

日志

下面是一些常用的关于 rke2 的命令,可参考:

kubeconfig

export KUBECONFIG=/etc/rancher/rke2/rke2.yaml
/var/lib/rancher/rke2/bin/kubectl get nodes
/var/lib/rancher/rke2/bin/kubectl --kubeconfig /etc/rancher/rke2/rke2.yaml get nodes

containerd

  • socket located at /run/k3s/containerd/containerd.sock

ctr

List containers using ctr

/var/lib/rancher/rke2/bin/ctr --address /run/k3s/containerd/containerd.sock --namespace k8s.io container ls

crictl

export CRI_CONFIG_FILE=/var/lib/rancher/rke2/agent/etc/crictl.yaml
/var/lib/rancher/rke2/bin/crictl ps
/var/lib/rancher/rke2/bin/crictl --config /var/lib/rancher/rke2/agent/etc/crictl.yaml ps
/var/lib/rancher/rke2/bin/crictl --runtime-endpoint unix:///run/k3s/containerd/containerd.sock ps -a

好的 谢谢