steep-toddler-8891302/28/2022, 2:54 PM
I have my digital ocean access token set up, and I initially created the Helm release with Pulumi, so I'm not clear as to why it suddenly isn't working. Any guidance or help would be massively appreciated!
error: can't create Helm Release with unreachable cluster: unable to load schema information from the API server: the server has asked for the client to provide credentials
bored-table-2069102/28/2022, 3:20 PM
steep-toddler-8891302/28/2022, 3:35 PM
k8s = do.KubernetesCluster("ptb-k8s", <etc>) kube_provider = Provider("ptb-k8s-provider", args=ProviderArgs(kubeconfig=k8s.kube_configs.raw_config)) opts = ResourceOptions(provider=kube_provider, depends_on=[kube_provider, k8s]) nginx_release_args = ReleaseArgs(name="nginx-ingress", <etc>) nginx_release = Release("nginx-ingress-controller", args=nginx_release_args, opts=opts)
are defined correctly, given that it isn't working
bored-table-2069102/28/2022, 4:00 PM
steep-toddler-8891302/28/2022, 4:22 PM
that the code uses above, and tried using it as the kubeconfig locally; it didn't work, which makes sense. I updated the token in the kubeconfig, ran a
while pointing to it as the kubeconfig, and it worked locally. So this means that somehow, the token in the kubeconfig in my code is incorrect... not quite sure how that happens.
kubectl get pods
2. open up
pulumi stack export --show-secrets --file mystack
and replace all instances of the previous, incorrect token with a new one that you know works (I just used vim fwiw), save and close the file 3.
And now my resources that touch the kubernetes server (secrets, helm charts, etc) do not run into the "unreachable cluster" error.
pulumi stack import --file mystack