pulumi / pulumi-eks

A Pulumi component for easily creating and managing an Amazon EKS Cluster
https://www.pulumi.com/registry/packages/eks/
Apache License 2.0
171 stars 82 forks source link

Cannot destroy eks cluster due to nodeAccess ConfigMap #598

Open alon-z opened 3 years ago

alon-z commented 3 years ago

Destroying a cluster that was created with roleMappings option will sometimes fail as the cluster is destroyed before deleting the nodeAccess config map.

Steps to reproduce

  1. Create an eks with roleMappings option
  2. Try to destroy

Expected: Cluster deleted Actual:

Diagnostics:
  kubernetes:core/v1:ConfigMap (mycluster-eks-1-nodeAccess):
    error: configured Kubernetes cluster is unreachable: unable to load schema information from the API server: the server has asked for the client to provide credentials
    If the cluster has been deleted, you can edit the pulumi state to remove this resource
lukehoban commented 3 years ago

Interesting. Very possible there is an implicit dependency edge required that is not being captured, and that this only sometimes leads to a problem as these deletes end up being run in parallel and race with one another.

myrcutio commented 2 months ago

In case anyone comes across this, i was at least able to delete the stack by setting the PULUMI_K8S_DELETE_UNREACHABLE=true env var in the shell before running pulumi down. Not ideal of course, I would expect a delete operation to be fine when the cluster in question has already been deleted.