This message was deleted.
# kubernetes
s
This message was deleted.
g
You would set kubeconfig on the provider vs reading it. Eg.
Copy code
var k8sProvider = new Provider("k8s", new ProviderArgs
        {
            KubeConfig = kubeConfig
        });
I construct mine like so:
Copy code
ListManagedClusterAdminCredentials.Invoke(new ListManagedClusterAdminCredentialsInvokeArgs
        {
            ResourceGroupName = resourceGroupName,
            ResourceName = clusterName
        }).Apply(credentials => {
            var encoded = credentials.Kubeconfigs[0].Value;
            var data = Convert.FromBase64String(encoded);
            return Encoding.UTF8.GetString(data);
        });
Sorry for the c#
thats azure k8s
it will be implementation specific
g
I've already got a provider; i'm implementing a custom component for cert-manager which receives a k8s.Provider for deploying a chart to. But i need to use a k8s sdk to ready check the admission controllers So i need to use the kubeconfig again but want to get it back out of the provider instead of passing another input to the component if that makes sense
I actually found the
provider.kubeconfig
is available at runtime, it's just not in the type declarations for some reason.
g
can you not pass it the entire provider instance and reference it in the chart resource?
g
I did, and the chart deploys. That's not the question 😬
g
Sure sure
Reading the docs kubeConfig is a documented field of the provider. Maybe an oversight in the typescript offering
👍 1
I've been totally unhelpful, i'll leave you to it 👍
g
No worries, confusing question