terraform-aws-eks-jx icon indicating copy to clipboard operation
terraform-aws-eks-jx copied to clipboard

Error: Kubernetes cluster unreachable: stat /home/terraform/.kube/config: no such file or directory

Open KaKeimei opened this issue 3 years ago • 3 comments

Summary

Use terraform cloud to execute "terraform apply". After the first deployment, I changed the configs to deploy again, and terraform cloud loses the file /home/terraform/.kube/config.

Steps to reproduce the behavior

Use terraform cloud to apply more than once

Expected behavior

Successfully applied.

Actual behavior

Error while refreshing state.

Terraform version

0.13.5 The output of terraform version is:

module.eks-jx.module.cluster.null_resource.kubeconfig: Refreshing state... [id=6000627443971900064]
module.eks-jx.module.cluster.kubernetes_config_map.jenkins_x_requirements[0]: Refreshing state... [id=default/terraform-jx-requirements]
module.eks-jx.module.cluster.helm_release.jx-git-operator[0]: Refreshing state... [id=jx-git-operator]

Warning: Interpolation-only expressions are deprecated

  on .terraform/modules/eks-jx/modules/cluster/local.tf line 13, in locals:
  13:   cluster_trunc          = substr("${var.cluster_name}", 0, 40)

Terraform 0.11 and earlier required all non-constant expressions to be

Error: Kubernetes cluster unreachable: stat /home/terraform/.kube/config: no such file or directory

Module version

Operating system

KaKeimei avatar Oct 27 '20 16:10 KaKeimei

Which config did you change when deploying? kubeconfig?

ankitm123 avatar Oct 30 '20 20:10 ankitm123

Actually I think it could be an issue with the terraform helm provider, I will investigate it a bit more, and report back.

ankitm123 avatar Nov 11 '20 14:11 ankitm123

Issues go stale after 90d of inactivity. Mark the issue as fresh with /remove-lifecycle stale. Stale issues rot after an additional 30d of inactivity and eventually close. If this issue is safe to close now please do so with /close. Provide feedback via https://jenkins-x.io/community. /lifecycle stale

jenkins-x-bot avatar Feb 09 '21 15:02 jenkins-x-bot