miniature-ghost-94202
10/19/2025, 8:46 PMgcp.container.Cluster ) and a usable kubernetes provider (kubernetes.Provider ) for that same cluster in the same run?
I'm getting
error: kubernetes:<http://helm.sh/v4:Chart|helm.sh/v4:Chart> resource 'external-dns' has a problem: configured Kubernetes cluster is unreachable: unable to load Kubernetes client configuration from kubeconfig file. Make sure you have:
• set up the provider as per <https://www.pulumi.com/registry/packages/kubernetes/installation-configuration/>
invalid configuration: [context was not found for specified context: gke_xxxxxx_us-central1-a_main, cluster has no server defined]
error: Program failed with an unhandled exception:
I can't find a way to make the kubernetes.Provider wait to until the cluster is actually created and the ~/.kube/config updated. I have a command.local.Command that runs after the gcp.container.Cluster and updates the kubeconfig, But it seems that pulumi want to read the kubeconfig before it's updated.
I want to do this in the same stack if possible as this is a stack that I have for testing so I want to created and destroy in the same day. (I already verified that if I comment the helm chart part, I can create the gke cluster and if I then uncomment the chart then the helm release is created since the kubeconfig is already updated in the second run).miniature-ghost-94202
10/19/2025, 11:43 PMpulumi up --skip-preview'miniature-ghost-94202
10/20/2025, 5:52 AMstocky-restaurant-98004
10/20/2025, 3:05 PMstocky-restaurant-98004
10/20/2025, 3:06 PMapply to create the Kubeconfig text once the cluster is ready, then, because explicit providers are also Pulumi resources use the Kubeconfig (which is itself Output<string>) to construct the K8s provider.miniature-ghost-94202
10/20/2025, 8:09 PMkubernetes.Provider , the problem was that the kubernetes.helm.v4.Chart was not using that provider, I forgot to put opts=pulumi.ResourceOptions(provider=kubernetes_provider) so it was trying to use the default kubernetes provider.