late-lizard-19909
02/14/2023, 9:22 PMsalmon-account-74572
02/14/2023, 9:42 PMkubelogin
and is configured to do device login (as you’ve observed). If you are passing this Kubeconfig to a Kubernetes provider, then that’s probably why you’re seeing the behavior you’re seeing.late-lizard-19909
02/14/2023, 9:43 PMsalmon-account-74572
02/14/2023, 9:54 PMListManagedClusterUserCredentials
(or ListManagedClusterUserCredentialsOutput
), you might try ListManagedClusterAdminCredentials
instead. Otherwise, I’m not sure how to get the provider authenticated to Azure properly.late-lizard-19909
02/15/2023, 8:43 PM// Export the KubeConfig
MyKubeConfig = GetKubeConfig(rgName, cluster.Name);
// Create a k8s provider pointing to the kubeconfig.
var k8sProvider = new Pulumi.Kubernetes.Provider("k8s", new Pulumi.Kubernetes.ProviderArgs
{
KubeConfig = MyKubeConfig,
});
var k8sCustomResourceOptions = new CustomResourceOptions
{
Provider = k8sProvider,
DependsOn = cluster
};
var appnamespace = new Pulumi.Kubernetes.Core.V1.Namespace("appName", new NamespaceArgs()
{
Metadata = new ObjectMetaArgs()
{
Name = appName
},
ApiVersion = "v1",
Kind = "Namespace"
}, k8sCustomResourceOptions);
var appNamespaceProvider = new Pulumi.Kubernetes.Provider("k8s-sdbackplaneprivate-provider",
new Pulumi.Kubernetes.ProviderArgs()
{
KubeConfig = MyKubeConfig,
Namespace = appnamespace.Metadata.Apply(c => c.Name)
});
salmon-account-74572
02/15/2023, 9:00 PMlate-lizard-19909
02/15/2023, 9:00 PMsalmon-account-74572
02/15/2023, 9:05 PMlate-lizard-19909
02/15/2023, 9:06 PMsalmon-account-74572
02/15/2023, 9:10 PMGetKubeConfig
, but that’s what I need to do some digging to find out.late-lizard-19909
02/15/2023, 9:17 PMsalmon-account-74572
02/15/2023, 9:22 PMlate-lizard-19909
02/15/2023, 9:55 PMsalmon-account-74572
02/15/2023, 11:33 PMlate-lizard-19909
02/16/2023, 2:33 PM