steep-toddler-88913
02/28/2022, 2:54 PMerror: 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
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!bored-table-20691
02/28/2022, 3:20 PMsteep-toddler-88913
02/28/2022, 3:35 PMk8s = do.KubernetesCluster("ptb-k8s", <etc>)
kube_provider = Provider("ptb-k8s-provider", args=ProviderArgs(kubeconfig=k8s.kube_configs[0].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)
kube_provider
and opts
are defined correctly, given that it isn't workingbored-table-20691
02/28/2022, 4:00 PMsteep-toddler-88913
02/28/2022, 4:22 PMraw_config
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 kubectl get pods
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.pulumi stack export --show-secrets --file mystack
2. open up 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. pulumi stack import --file mystack
And now my resources that touch the kubernetes server (secrets, helm charts, etc) do not run into the "unreachable cluster" error.