Get shell access to nodes in Kubernetes via kubectl

First, let’s learn the names of the nodes we have

devs@d8:~$ kubectl get nodes
NAME             STATUS   ROLES           AGE    VERSION
docker-desktop   Ready    control-plane   2d2h   v1.25.2

i only have one node at the moment 🙂

then i just need to give this commanf for shell login, i already have given ubuntu as image here, you can give any another image you want.

kubectl debug node/docker-desktop -it --image=Ubuntu

Views: 41