This message was deleted.
# general
s
This message was deleted.
s
@bulky-noon-79266 Take a look at our AKS example, found at https://github.com/pulumi/templates/tree/master/kubernetes-azure-yaml and you’ll see an example of how to get the Kubeconfig. Use that Kubeconfig to create a new explicit provider, and then use that explicit provider for your Helm chart.
b
Hi, Thanks a lot, it should work
Actually, that's already what's I'm doing, I have the kubeconfig at the end of the pulumi up but I have another stage (type: kubernetes:helm.sh/v3:Release) just after managed cluster creation, in the same yaml, that needs cluster kubeconfig
I'm looking for a way to use the kubeconfig in the kuberneteshelm.sh/v3Release stage
if I try to use the variable, the kubernetes:helm.sh/v3:Release stage doesn't wait for the azure-nativecontainerserviceManagedCluster to be completed
s
Right---you need to create a Kubernetes provider, specifying the Kubeconfig when creating the provider. Then, you specify that provider when creating the Helm chart resource.
b
ok, I understand, this is the example I'm looking for
+ ├─ azure-nativecontainerserviceManagedCluster managedCluster create + ├─ kubernetes:helm.sh/v3:Release ingressController create + └─ pulumiproviderskubernetes kubernetesProvider create
helm stage doesn't seems to be linked to the kubernetes provider
s
Did you specify the Kubernetes provider as the provider to use for the Helm resource? Otherwise, it won’t know and it will try to use the default provider and won’t know to take a dependency on the cluster itself.
b
that's my issue, helm try to use my ~/.kube/config instead of the generated config file
event if I drop ~/.kube from my filesystem
s
You need to specify the explicit provider you created as the one to use for the Helm resource, see https://www.pulumi.com/docs/concepts/options/provider/
b
it's ok now
kubernetesProvider: type: pulumiproviderskubernetes properties: kubeconfig: ${actualKubeConfig} ingressController: type: kuberneteshelm.sh/v3Release options: provider: ${kubernetesProvider} properties:
1
it could be great to add a yaml example with custom provider, this information is not easy to find
Thanks a lot, have a nice day Scott
s
Happy to help. You have a great day, too!
🙏 1