Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
KaKeimei opened this issue Oct 27, 2020 · 3 comments

Comments

@KaKeimei
Copy link
Contributor

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

@ankitm123
Copy link
Member

Which config did you change when deploying? kubeconfig?

@ankitm123
Copy link
Member

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

@jenkins-x-bot
Copy link

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants