Hello @Aaron Peschel ,
Thank you for reaching Microsoft Q&A Platform. Please find the answer below for your query.
When you provision a private AKS cluster, AKS by default creates a private FQDN with a private DNS zone and an additional public FQDN with a corresponding A record in Azure public DNS. The agent nodes still use the A record in the private DNS zone to resolve the private IP address of the private endpoint for communication to the API server. Reference
Thus the primary FQDN for the Private AKS cluster is the private FQDN ( *.privatelink.<region>.azmk8s.io
). The public FQDN ( *.hcp.eastus.azmk8s.io
) is optional and you may choose to disable it. Reference
The Azure Portal Azure Kubernetes Service Blade is reflects the public FQDN if it is enabled, else it reflects the private FQDN. However, if you run the az aks show
command from the Azure CLI you would find both:
...
"fqdn": "akstest-test-xxxxxx-xxxxxxxx.hcp.eastus.azmk8s.io",
...
"privateFqdn": "akstest-test-xxxxxx-xxxxxxxx.xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx.privatelink.eastus.azmk8s.io",
...
However, az aks get-credentials merges only the primary FQDN (in case of the private AKS cluster, that would be the private FQDN) to the ~/.kube/config
file in your local environment.
Since the private FQDN is not resolvable over public internet hence using that would not help you connect to the private AKS cluster's API server over the internet. However, if you did not disable the public FQDN, then it can be used in the ~/.kube/config
file to connect to the private AKS cluster's API server.
You can also follow the documentation here to access the private AKS cluster remotely.