Reputation: 65
I'm trying to run helm command from my terraform configuration. But i'm getting kubernetes cluster unreachable error. My cluster is private and i don't want to change it. How can i access it?
Error: Kubernetes cluster unreachable: Get "https://aksdns-8f2967.c8e977-d63e-461f-a4b6-c356d1.privatelink.westeurope.azmk8s.io:443/version": dial tcp: lookup aksdns-8f67.c8e95477-d63e-461f-a4b6-c33b2d6d1.privatelink.westeurope.azmk8s.io on 192.168.1.1:53: no such host
resource "helm_release" "ingress-nginx" {
name = "ingress-nginx"
namespace = "ingress-nginx"
create_namespace = true
repository = "https://kubernetes.github.io/ingress-nginx"
chart = "ingress-nginx"
values = [
file("ingress-nginx-values.yaml")
]
}
Upvotes: 1
Views: 1840
Reputation: 16218
You will need to run your Terraform scripts from a machine (like a build agent) that is connected via VNet connection to that private cluster. That is the whole point of private clusters: The control plane is only accessible to machines with direct line-of-sight, not over the internet.
Upvotes: 2