Azure AKS node access box without public IPs.
-
Deploy access box pod
kubectl --kubeconfig k.yaml apply -f accessbox.yaml
-
Make sure it is running:
kubectl --kubeconfig k.yaml get po
-
Go to Azure dashboard -> VMSS -> Instance -> Connect -> SSH -> Click step3 "Replace/reset your SSH private key". Save the private key as key.pem
-
Go back to Azure dashboard -> VMSS -> Instance, click "Upgrade", copy "Private IP address"
-
Exec into the pod
kubectl --kubeconfig k.yaml exec accessbox -it -- /bin/bash
-
Paste the private key key.pem got from step "Credential"
vi key.pem
-
chmod 400 key.pem
-
SSH to the node
ssh -i key.pem azureuser@<Private IP address>