5

I've been asked by Azure support to open the question here, though i think this is an AKS bug.

When deploying a cluster each node 'node.status.addresses' should show an externalip or hostname of the node by design but there is a VM name in hostname address in instead of it in AKS made cluster. Which makes it is really hard to know node public ips for various reasons we need them.

Is there any standard or nonstandard way to get node public ip ?

eugeneK
  • 10,750
  • 19
  • 66
  • 101

4 Answers4

6

There is the public IP exposed for the Azure Kubernetes Service, but it's not directly to the node. Actually, the Kubernetes node will not be exposed to the internet with a public IP.

The AKS nodes create in a VNet on Azure and access or can be accessed through the Azure Load Balancer with a public IP. The VNet is a private network as a resource of Azure. For the VNet, there are two types such as Basic and Advanced. You can get more details, see Network concepts for applications in Azure Kubernetes Service (AKS).

Charles Xu
  • 29,862
  • 2
  • 22
  • 39
  • 1
    What If we make a request to the public web from a pod that isnt exposed? Somehow the response need to find its way back. And it does afaik. I am trying to understand how this traffic can reach a pod that isnt exposed. – The Fool Oct 13 '21 at 17:02
3

AKS nodes are not exposed to the public internet and therefore will not have an exposed public IP.

With that said, I’ve been investigating an issue where nodes either lose or fail to ever get an internal IP. We (AKS) have implemented an initial fix, which restarts kubelet, and does seem to at least temporarily mitigate the lack of an internal IP. There are ongoing efforts upstream to find and fix the real root cause.

I don’t think I’ve come across the scenario of a node not having a hostname address though. I’m going to log a backlog item to investigate any clusters that appear to be experiencing this symptom. I can’t promise an immediate fix, but I am definitely going to look into this further early next week.

  • Cool, though the VMs on which nodes are install have pubic ips in resource group AKS creates. So I don't really understand the part "AKS nodes are not exposed to the public internet and therefore will not have an exposed public IP". – eugeneK Oct 21 '18 at 05:59
2

There is a preview of a feature enabling a public IP per node. Please see https://learn.microsoft.com/en-us/azure/aks/use-multiple-node-pools#assign-a-public-ip-per-node-in-a-node-pool

Benjamin Talmard
  • 1,773
  • 11
  • 21
0

In common scenarios, each AKS node cluster will be behind a Load Balancer, which in turn will have an Public IP. You can get the public IP by going to your AKS Cluster -> Services & Ingresses -> Check for Service with Type Load Balancer. This will have a Public IP.

You can also configure the cluster so each Node has a Public IP. You can then access the details from the Node Pool tab.

SSG
  • 192
  • 2
  • 12