Get Shell Session into Kubernetes Worker Node
Open a shell on Azure Kubernetes Node, without SSH.
In my last post, I talked about connecting to a Azure Kubernetes (AKS) worker node using SSH. But sometimes, you might not have access to the private key used and don't want to update the key either.
Kubernetes provides a way to access worker node.
List Nodes
kubectl get nodes -o wide
Connect to worker node
kubectl debug node/<node> -it --image=mcr.microsoft.com/cbl-mariner/busybox:2.0
Where:
- node: name of the node
For example, the following command will connect to
aks-nodepool1-37663765-vmss000000
kubectl debug node/aks-nodepool1-37663765-vmss000000 -it --image=mcr.microsoft.com/cbl-mariner/busybox:2.0