Azure / terraform-azurerm-appgw-ingress-k8s-cluster

The Application Gateway Ingress Controller allows the Azure Application Gateway to be used as the ingress for an Azure Kubernetes Service aka AKS cluster. As shown in the figure below, the ingress controller runs as a pod within the AKS cluster. It consumes Kubernetes Ingress Resources and converts them to an Azure Application Gateway configuration which allows the gateway to load-balance traffic to Kubernetes pods.
MIT License
38 stars 35 forks source link

Getting kubeconfig ? #2

Open rajesh-chawla opened 5 years ago

rajesh-chawla commented 5 years ago

I've been able to successfully invoke this module and now I'd like to download the kubeconfig file from the k8s cluster created.

I don't see any items as output from the module, so I'm looking for suggestions on how to get access to the kubeconfig file for the k8s cluster after calling the module.

Regards, Rajesh

eugen-ananin commented 4 years ago

In your output file you can use this:

output "kube_config" {
  value = azurerm_kubernetes_cluster.test.kube_config_raw
}
manoatsas commented 4 years ago

@eugen-ananin that fails when using this as a module, as documented here https://registry.terraform.io/modules/Azure/appgw-ingress-k8s-cluster/azurerm/0.1.1 Should this project define outputs.tf file for attributes - AKS(https://www.terraform.io/docs/providers/azurerm/r/kubernetes_cluster.html#attributes-reference) and App Gateway (https://www.terraform.io/docs/providers/azurerm/r/application_gateway.html#attributes-reference)

manoatsas commented 4 years ago

I created a pull request that should address this issue - https://github.com/Azure/terraform-azurerm-appgw-ingress-k8s-cluster/pull/7