-
Notifications
You must be signed in to change notification settings - Fork 169
When destroying: Error: Get "http: localhost api v1 namespaces mushop": dial tcp [::1]:80: connect: connection refused or cluster has no server defined
This wiki is in case you are having errors like:
Error: Get "http: localhost api v1 namespaces mushop": dial tcp [::1]:80: connect: connection refused
Or
Error: invalid configuration: [command must be specified for to use exec authentication plugin, apiVersion must be specified for to use exec authentication plugin, cluster has no server defined
This error may occur if you are using an old version of the stack with new ORM or using new terraform version with old repo contents.
Terraform changed how process internally interpolation and the Terraform Kubernetes provider changed how to stacking the kubeconfig metadata. Details here.
If using local terraform or terraform on OCI CLoudShell. Keep the tfstate and pull the latest from the repo. Then hit terraform destroy
again. If for some reason still showing the localhost error, you may need to generate the kubeconfig from the OCI console and copy to terraform/generated/kubeconfig, then hit terraform destroy
again.
If using ORM and this error appear, the best solution is to edit your stack and upload the new zip file from here: MuShop Stack v3.0.0 and then Destroy stack. Note: Referencing the v3.0.0, as this error may occur only with older versions.
If the error persist. You may need to extract the stack.zip contents, generate an OKE kubeconfig and copy to the terraform/generated/kubeconfig location. Zip the stack again and upload to your stack.
Alternatively you may need to delete each resource created. To facilitate that, search for the 4-digit deploy id on the OCI console. Will show all resources created for the MuShop.