Bootstrap FreeKB - Kubernetes - Resolve "Kubernetes cluster unreachable: invalid configuration: no configuration has been provided, try setting KUBERNETES_MASTER environment variable"
Kubernetes - Resolve "Kubernetes cluster unreachable: invalid configuration: no configuration has been provided, try setting KUBERNETES_MASTER environment variable"

Updated:   |  Kubernetes articles

Let's say something like this is being returned.

Error: Kubernetes cluster unreachable: invalid configuration: no configuration has been provided, try setting KUBERNETES_MASTER environment variable

 

I got this when attempting to Create an Elastic File System (EFS) with a CDI Driver using Terraform.

You can try setting the KUBE_CONFIG variable to point to your kube config file.

export KUBE_CONFIG_PATH=/path/to/kube/config

 

Or, if using Terraform, your kubernetes provider.tf file could include config_path with the path to your kube config file.

provider "kubernetes" {
  config_path = "/path/to/kube/config"
}

 

Or, you may need to include the helm provider.

provider "helm" {
  kubernetes {
    config_path = "/path/to/kube/config"
  }
}

 




Did you find this article helpful?

If so, consider buying me a coffee over at Buy Me A Coffee



Comments


Add a Comment


Please enter cc4bb3 in the box below so that we can be sure you are a human.