This message was deleted.
s
This message was deleted.
s
The error message seems to indicate that it’s unable to communicate with the Kubernetes API endpoint for some reason. Is that the correct endpoint? Is the appropriate traffic being allowed to that endpoint?
r
Well here is the thing. It’s on a Pulumi up of a completely new deployment… so no endpoint exists yet. The same plan should create the Kubernetes Cluster and the endpoint… therefore I can only assume that endpoint is an old kubeconfig on my local machine. Is there a way to do this without thenkuneconfig needed till after the cluster is build and kubeconfig created?
s
Hmmm…if you create a new Kubernetes provider using the Kubeconfig generated by the cluster creation, then Pulumi should understand the dependency and not try to deploy the Helm chart until after the cluster is created.
r
Yeah I might have to create an explicit Kubernetes config.
I’m currently not doing that and I assume it’s just defaulting to local.
s
In TS, that would look something like this:
Copy code
import * as k8s from "@pulumi/kubernetes";
const k8sProvider = new k8s.Provider("new-k8s-provider", {kubeconfig: cluster-config});
And then you’d reference
k8sProvider
when you define the Kubernetes/Helm objects. And yes, if you aren’t creating an explicit provider, then it’s using the default provider, which in turn is using your local configuration to determine endpoint and such.
s
Scott is right - that's almost certainly what's wrong. You have to create an explicit provider and pass in the Kubeconfig.
r
I’ll have to get this locked into the design then! Thanks very much!
s
Happy to help! (And thanks for the extra confirmation, @stocky-restaurant-98004!)
214 Views