Welcome to the Linux Foundation Forum!

[containerd] list of containers

Hello,
Calling sudo crictl ps -a produces two warnings and two errors:

  1. $ k get po --all-namespaces
  2. NAMESPACE NAME READY STATUS RESTARTS AGE
  3. accounting nginx-one-6f98c96fc6-7rfl5 2/2 Running 6 (28m ago) 3d3h
  4. accounting nginx-one-6f98c96fc6-fmclb 2/2 Running 6 (28m ago) 3d3h
  5. accounting nginx-one-6f98c96fc6-k62n5 2/2 Running 6 (28m ago) 3d3h
  6. accounting nginx-one-6f98c96fc6-rz9t4 2/2 Running 6 (28m ago) 3d3h
  7. accounting nginx-one-6f98c96fc6-x8mwh 2/2 Running 6 (28m ago) 3d3h
  8. default my-nginx-dep-7577875bb4-kpvpb 1/1 Running 3 (28m ago) 3d6h
  9. default myingress-ingress-nginx-controller-627kz 2/2 Running 2 (28m ago) 24h
  10. default myingress-ingress-nginx-controller-g4p26 2/2 Running 4 (28m ago) 2d
  11. default web-one-6745f6ddd8-2zqbt 1/1 Running 3 (28m ago) 3d3h
  12. default web-two-d8fdb7879-9xm8z 1/1 Running 3 (28m ago) 3d3h
  13. kube-system calico-kube-controllers-56cdb7c587-w68kv 1/1 Running 8 (28m ago) 4d3h
  14. kube-system calico-node-2slwc 1/1 Running 4 (28m ago) 4d3h
  15. kube-system calico-node-q9pkl 1/1 Running 4 (28m ago) 4d3h
  16. kube-system coredns-6d4b75cb6d-67cnn 1/1 Running 4 (28m ago) 4d3h
  17. kube-system coredns-6d4b75cb6d-chzsn 1/1 Running 4 (28m ago) 4d3h
  18. kube-system etcd-cpnode 1/1 Running 9 (28m ago) 4d3h
  19. kube-system kube-apiserver-cpnode 1/1 Running 9 (28m ago) 4d3h
  20. kube-system kube-controller-manager-cpnode 1/1 Running 4 (28m ago) 4d3h
  21. kube-system kube-proxy-mm4sb 1/1 Running 4 (28m ago) 4d3h
  22. kube-system kube-proxy-p9rx5 1/1 Running 4 (28m ago) 4d3h
  23. kube-system kube-scheduler-cpnode 1/1 Running 4 (28m ago) 4d3h
  24. linkerd-viz grafana-5595bcc798-6xwlv 2/2 Running 6 (28m ago) 3d6h
  25. linkerd-viz metrics-api-69d57b76db-zfc6q 2/2 Running 12 (23m ago) 3d6h
  26. linkerd-viz prometheus-5db449486f-q6dn6 2/2 Running 6 (28m ago) 3d6h
  27. linkerd-viz tap-6b699d897f-52nzm 2/2 Running 11 (28m ago) 3d6h
  28. linkerd-viz tap-injector-7489469df9-zxkd6 2/2 Running 8 (28m ago) 3d6h
  29. linkerd-viz web-55b57f8b89-htvgj 2/2 Running 6 (28m ago) 3d5h
  30. linkerd linkerd-destination-d4bcbc947-7vvm2 4/4 Running 12 (28m ago) 3d6h
  31. linkerd linkerd-identity-685dc4fd66-9pzj6 2/2 Running 6 (28m ago) 3d6h
  32. linkerd linkerd-proxy-injector-85dfcb6798-zqptp 2/2 Running 8 (22m ago) 3d6h
  33.  
  34. $ sudo crictl ps -a
  35. WARN[0000] runtime connect using default endpoints: [unix:///var/run/dockershim.sock unix:///run/containerd/containerd.sock unix:///run/crio/crio.sock unix:///var/run/cri-dockerd.sock]. As the default settings are now deprecated, you should set the endpoint instead.
  36. ERRO[0000] unable to determine runtime API version: rpc error: code = Unavailable desc = connection error: desc = "transport: Error while dialing dial unix /var/run/dockershim.sock: connect: no such file or directory"
  37. WARN[0000] image connect using default endpoints: [unix:///var/run/dockershim.sock unix:///run/containerd/containerd.sock unix:///run/crio/crio.sock unix:///var/run/cri-dockerd.sock]. As the default settings are now deprecated, you should set the endpoint instead.
  38. ERRO[0000] unable to determine image API version: rpc error: code = Unavailable desc = connection error: desc = "transport: Error while dialing dial unix /var/run/dockershim.sock: connect: no such file or directory"
  39. CONTAINER IMAGE CREATED STATE NAME ATTEMPT POD ID POD
  40. 03f5f040e7f23 04fcc70194086 33 minutes ago Running controller 1 17749e5a9f78e myingress-ingress-nginx-controller-627kz
  41. e380aa9be5450 fb049291a9df1 35 minutes ago Running linkerd-proxy 1 17749e5a9f78e myingress-ingress-nginx-controller-627kz
  42. 08c5a3bfa7d6e f13f2bbffc542 35 minutes ago Exited linkerd-init 1 17749e5a9f78e myingress-ingress-nginx-controller-627kz
  43. 9cb8bbfa08c2a fbfd04bbb7f47 35 minutes ago Running calico-node 4 32f39ef8efe5a calico-node-2slwc
  44. bc5cee820f48a 90d97aa939bbf 35 minutes ago Exited install-cni 0 32f39ef8efe5a calico-node-2slwc
  45. 23998919fdc52 90d97aa939bbf 36 minutes ago Exited upgrade-ipam 0 32f39ef8efe5a calico-node-2slwc
  46. eba22165d57f6 beb86f5d8e6cd 36 minutes ago Running kube-proxy 4 adb1513446c7a kube-proxy-p9rx5
  47. 0bc226b330aff aebe758cef4cd 37 minutes ago Running etcd 9 4fc9149069298 etcd-cpnode
  48. 000593b5bfae3 b4ea7e648530d 37 minutes ago Running kube-controller-manager 4 013d7c5f7eb42 kube-controller-manager-cpnode
  49. 6bd3fb0c1ca5c 18688a72645c5 37 minutes ago Running kube-scheduler 4 455890d4f878d kube-scheduler-cpnode
  50. 56343cec3c54a e9f4b425f9192 37 minutes ago Running kube-apiserver 9 839b5ce1917e8 kube-apiserver-cpnode
  51. 0579e99004d96 04fcc70194086 24 hours ago Exited controller 0 923f5bf12a33c myingress-ingress-nginx-controller-627kz
  52. 43eb8c0346fa1 fb049291a9df1 24 hours ago Exited linkerd-proxy 0 923f5bf12a33c myingress-ingress-nginx-controller-627kz
  53. 7e69a70e2ef3a fbfd04bbb7f47 25 hours ago Exited calico-node 3 313920ced5df6 calico-node-2slwc
  54. 246ea0f0ee0da beb86f5d8e6cd 25 hours ago Exited kube-proxy 3 2de141993821f kube-proxy-p9rx5
  55. 507a8ca5578ba b4ea7e648530d 25 hours ago Exited kube-controller-manager 3 ce6f69d9eacda kube-controller-manager-cpnode
  56. b45e20d890596 18688a72645c5 25 hours ago Exited kube-scheduler 3 685494fb92b9b kube-scheduler-cpnode
  57. 287a7a614b36b e9f4b425f9192 25 hours ago Exited kube-apiserver 8 88d831949abda kube-apiserver-cpnode
  58. 9d302b0191c95 aebe758cef4cd 25 hours ago Exited etcd 8 926399ccacf48 etcd-cpnode

Any idea what goes wrong?

Best Answer

  • Posts: 57
    Answer ✓

    @thomas.bucaioni You can find out what container runtime is used on you kates nodes with this command kubectl get nodes -o wide and use the same for crictl.
    For example if you want to use containerd runtime you have to use this command:

    1. echo "===================================" &&\
    2. echo "Config BEFORE change:" &&\
    3. sudo cat /etc/crictl.yaml &&\
    4. sudo crictl config --set runtime-endpoint=unix:///run/containerd/containerd.sock --set image-endpoint=unix:///run/containerd/containerd.sock &&\
    5. echo "===================================" &&\
    6. echo "Config AFTER change:" &&\
    7. sudo cat /etc/crictl.yaml

Answers

Welcome!

It looks like you're new here. Sign in or register to get started.
Sign In

Welcome!

It looks like you're new here. Sign in or register to get started.
Sign In

Categories

Upcoming Training