Uncategorized

AKS – SSH to first node without VPN

I made a small improvement to pre-select AKS node for SSH

Background

For security purposes, the AKS nodes aren’t exposed to the internet. To SSH to the AKS nodes, you use kubectl debug or the private IP address.

REF: Connect with SSH to Azure Kubernetes Service (AKS) cluster nodes for maintenance or troubleshooting

Kubectl Debug with MS container

#Begin Will SSH to Node defined as 0 (first) in the items[0].. 

node=$(kubectl get nodes -o=jsonpath='{.items[0].metadata.name}')
val=$(echo $node | sed 's/"//g')
kubectl debug node/$val -it --image=mcr.microsoft.com/aks/fundamental/base-ubuntu:v0.0.11 --namespace="kube-system"


#End

0 comments on “AKS – SSH to first node without VPN

Vastaa

Täytä tietosi alle tai klikkaa kuvaketta kirjautuaksesi sisään:

WordPress.com-logo

Olet kommentoimassa WordPress.com -tilin nimissä. Log Out /  Muuta )

Facebook-kuva

Olet kommentoimassa Facebook -tilin nimissä. Log Out /  Muuta )

Muodostetaan yhteyttä palveluun %s

%d bloggaajaa tykkää tästä: