After I create a kubernetes cluster in pulumi, I get the following error when trying to delete it:
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
I can refresh the credentials by running a targeted pulumi refresh
and then a targeted pulumi up
on the k8s provider. Is there an easier way to keep the kubernetes clusters updated without having to run the targeted commands all the time?
CodePudding user response:
Pulumi refresh, will allow you to manually refresh the state from target cloud providers, but doing it automatically will cause users to frequently find themselves in a situation where Pulumi preview and Pulumi update may provide incorrect guidance (since this is based on the stale state of the Pulumi checkpoint rather than the state the user is aware of their resources being in).
The reason why it might not be a good idea to use an automatic refresh is (as suggested in Consider automatically refreshing on preview/update/destroy), it would be nice to indicate which resources require refreshment on each run by manually doing the refresh.
Refer this Git link for more information