databricks / click

The "Command Line Interactive Controller for Kubernetes"
Apache License 2.0
1.49k stars 84 forks source link

Cannot access AKS cluster with RBAC enabled #81

Closed maximbaz closed 5 years ago

maximbaz commented 5 years ago

Hi there,

I wanted to try your project on my AKS cluster, but I cannot select anything except context due to missing access.

[none] [none] [none] > context dev
[dev] [none] [none] > pods
Server Error: pods is forbidden: User "clusterUser" cannot list pods at the cluster scope

Here's my ~/.kube/config file:

apiVersion: v1
clusters:
- cluster:
    certificate-authority-data: XXXX
    server: https://XXX:443
  name: dev
contexts:
- context:
    cluster: dev
    user: clusterUser_dev
  name: dev
current-context: dev
kind: Config
preferences: {}
users:
- name: clusterUser_dev
  user:
    client-certificate-data: XXX
    client-key-data: XXX
    token: XXX
milesgranger commented 5 years ago

I've having the same issue, @nicklan do you have any advice?

evenh commented 5 years ago

I observe the same issues as well when trying to use click with a RBAC-enabled cluster

nicklan commented 5 years ago

Ohh hah, so AKS wants both a Bearer token, and the client cert/key. I'll need to refactor the auth stuff a bit to make this work, but should have a fix in the near future.

nicklan commented 5 years ago

This is fixed by #96 in my testing. Can any of you pull master, build and test for me that it works for you too? Thanks!

maximbaz commented 5 years ago

Everything works perfectly, thanks @nicklan!