Search code examples
azuredockerservicekubernetescontainers

SSH to Azure's Kubernetes managed master node


I just deployed a managed Kubernetes cluster with Azure Container Service. My deployment includes a single agent machine over the managed cluster and an Azure disk attached to it for persistent storage.

The problem I am facing is that I don't know how to ssh this agent server. I read that you should be able to ssh the master node and connect to the agent from there but as I am using a managed Kubernetes master I can't find the way of doing this.

Any idea? Thank you in advance.


Solution

  • The problem I am facing is that I don't know how to ssh this agent server.

    Do you mean you create AKS and can't find master VM?

    If I understand it correctly, that is a by design behavior, AKS does not provide direct access (Such as with SSH) to the cluster.

    If you want to SSH to the agent node, as a workaround, we can create a public IP address and associate this public IP address to the agent's NIC, then we can SSH to this agent.

    Here are my steps:

    1.Create Public IP address via Azure portal:

    enter image description here

    2.Associate the public IP address to the agent VM's NIC:

    enter image description here

    3.SSH to this VM with this public IP address:

    enter image description here

    Note:

    By default, we can find ssh key when we try to create AKS, like this:

    enter image description here