Kubernetes provider calling http://localhost/version?timeout=32s

Hey there!

I’m out of ideas honestly. I also created #708 and now am asking here as well.

Our Terraform setup includes some K8s resources using the official kubernetes provider. Since a few days suddenly, that setup stopped working.

Suddenly during a terraform plan, the kubernetes provider wants to call http://localhost/version?timeout=32s (and nobody’s answering). I believe, he wants to call the k8s api, but he actually should use the k8s host I have configured in the provider:

provider "kubernetes" {
  version                = "~> 1.10.0"
  host                   = module.azurekubernetes.host
  client_certificate     = base64decode(module.azurekubernetes.client_certificate)
  client_key             = base64decode(module.azurekubernetes.client_key)
  cluster_ca_certificate = base64decode(module.azurekubernetes.cluster_ca_certificate)
  load_config_file       = false

(module.azurekubernetes creates a managed k8s cluster in Azure, the returned value are set and correspond to the settings, that a kube-config would hold)

The call seems to only happen for this particular persistent volume:

resource "kubernetes_persistent_volume" "factfinder-pv" {
  metadata {
    name = "ff-nfs-client"
    labels = {
      type          = "factfinder"
      sub_type      = "nfs"
      instance_type = "pv"
  spec {
    access_modes = ["ReadWriteMany"]
    capacity = map("storage", "${var.shared_storage_size}Gi")

    persistent_volume_source {
      nfs {
        path   = "/"
        server = var.nfs_service_ip
    storage_class_name = "nfs"

Maybe somebody here has any idea.

Kind regards