How To: connect to AKS node with SSH - theartusz/config GitHub Wiki

I noen tilfeller er det nødvendig å koble seg til noden selv for å feilsøke ulike områder.

Microsoft dokumentasjon ref: (https://docs.microsoft.com/en-us/troubleshoot/azure/azure-kubernetes/capture-tcp-dump-linux-node-aks#step-2-connect-to-a-linux-node)

  1. Open up a terminal and connect to a Kubernetes cluster
  2. (In the default namespace) Create a debugging session for a desired node using the command kubectl debug nodes/ -it --image=mcr.microsoft.com/aks/fundamental/base-ubuntu:v0.0.11. This will generate a pod with name node-debugger--xxxxx running a container called debugger in the default namespace. The command will also open a interactive shell in the container (running Linux Ubuntu) automatically.
  3. When connected to the pod, run chroot /host
  4. This shell will be a SSH session towards the node itself that can be used for different tasks like listing pre-pulled images with crictl
    1. (Because we are using containerd)
    1. see node settings on linux level
⚠️ **GitHub.com Fallback** ⚠️