Does anyone know how to use a `kubeconfig` per the...
# azure
c
Does anyone know how to use a
kubeconfig
per the examples given from a
ManagedCluster
as an input to a provider when using
aad
integration? When trying this, we end up with a URL for devicelogin we need to go to and enter a code in, but this doesn’t work for automation.
f
Try remove kubeconfig from your Pulumi provider instance. And use
kubelogin
locally and in DevOps?
b
if you really want to use aad integration for your ci/cd connection, you're forced into devicelogin. Alternatively, you can just bypass it by getting administrative credentials
This is how I pull it:
Copy code
return azure.containerservice.listManagedClusterAdminCredentials({
    resourceGroupName: rgName,
    resourceName: clusterName,
},{
    provider: azureProvider
})
c
I'm happy to bypass aad integration for CI, I'm just not sure how. But with what you've said it gives me a bit of a hint to look into. We're new to Azure (coming from GCP) so it's a bit more complicated.
b
I feel you. I wish you the absolute best of luck there.
c
That code is exactly how we are doing it but when using that kubeconfig it asks for devicelogin
b
are you certain you\re using the ADMIN part?
listManagedCluster-ADMIN-Credentials
?
c
Oh maybe not. I will confirm again on Tuesday when I'm back on the office.
Thank you so much!
b
becuase if you use listManagedClusterUserCredentials - that's the one which requires devicelogin 😉
np - best of luck - ping me if you need anything else wrt this - I've been through enough pain it feels nice to talk about it 😄
c
Thank you. I understand the feeling.
It worked, thank you!