Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot Connect to AKS Cluster from Dev Laptop #175

Closed
nickward13 opened this issue Jun 20, 2018 · 4 comments
Closed

Cannot Connect to AKS Cluster from Dev Laptop #175

nickward13 opened this issue Jun 20, 2018 · 4 comments

Comments

@nickward13
Copy link

I'm trying to connect to an RBAC enabled AKS cluster using the recommended code from the README.md, along with a request to list the pods in the default namespace:

var config = KubernetesClientConfiguration.BuildConfigFromConfigFile();
var client = new Kubernetes(config);
client.ListNamespacedPod("default");

The client.ListNamespacedPod command throws an exception "Microsoft.Rest.HttpOperationException: Operation returned an invalid status code 'Forbidden'", with a response content of "pods is forbidden: User "clusterUser" cannot list pods in the namespace "default"". Using the same config file via kubectl retrieves a list of pods successfully.

Is this related to the known issue mentioned in the README.md - "Not all auth providers are supported at moment #91", or is it an additional error? The code appears to connect, but seems to be using a low privelege user account. I couldn't find a suitable issue covering this. Any suggestions would be great.

@brendandburns
Copy link
Contributor

@nickward13 what is in your kubeconfig file? is it certificate based auth? Or is it AAD based auth?

I will try to repro.

Thanks!

@nickward13
Copy link
Author

Thanks @brendandburns. Its certificate based auth - not AAD.

@nickward13
Copy link
Author

FYI - as per issue #176, I've lost access to the original AKS cluster I had this error on. I've tried to reproduce on another cluster, and have been unable to. Connectivity just works as expected...

@brendandburns
Copy link
Contributor

Closing this since we can't seem to reproduce.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants