Open OmpahDev opened 2 years ago
Hi @tdevopsottawa ,
Thank you for taking time to report this issue!
Would you please share how to find the private IP address
? Thanks!
@ms-henglu When an AKS cluster is created, Microsoft creates a bunch of resources at the same time, in an MC resource group. One of those resources created is a Network Interface - the private IP address is attached to that Network Interface.
@tdevopsottawa I know this is an year old issue. But were you able to figure out a way to get the private IP address? We are planning to use local exec to run az cli command to retrieve the IP but was looking for a better approach.
Is there an existing issue for this?
Community Note
Description
When creating a private kubernetes cluster using
kubernetes_cluster
, the hostname mentioned in the kubeconfig file is only resolvable from the virtual network, not from the internet. In my workflow, we then need to add an A record to our DNS server so that we can resolve the endpoint from our workstations. But there doesn't appear to be way to export the private IP address of the Kubernetes API server from akubernetes_cluster
resource, only the FQDN, so we can't use Terraform to actually add this DNS record, forcing us to create a terribly inefficient workflow where we use terraform to set up the cluster, then manually find the IP Address, add it to our DNS records, then resume using terraform to set up things inside the cluster.New or Affected Resource(s)/Data Source(s)
azurerm_kubernetes_cluster
Potential Terraform Configuration
References
No response