Search code examples
kubernetesrancher

Where are the kubernetes containers running?


I have a one node cluster (managed by Rancher) which wasn't setup by me so I dont know the details.

kubectl get nodes returns one node named node-1;
kubectl get pods -o wide shows that every (~40) pod running on that node-1 (of course).

But when I ssh into node-1 as root the docker ps command shows only rancher/rancher:v2.6.3 as running container.

So what hides Rancher from us? Where can I access the docker context of the running pods?


Solution

  • The docker ps command most likely won't return what you expected because Kubernetes dropped Docker as a container runtime about a year ago. This doesn't mean container images built by Docker won't run in Kubernetes, it just means that some of Docker's underlying functionalities are not included with Kubernetes.

    It seems that Rancher itself does run as a Docker container, however the pods themselves do not. If you wanted to interact with the pods from within the node, you can look into nerdctl or ctr (assuming your cluster's container runtime is containerd).