portworx/px-dev

Document where and how to provide kubernetes credentials

Closed this issue · 3 comments

I'm using kubernetes bootstrapped via tectonic-installer with RBAC enabled. I submitted a kubernetes.yaml/admin.conf likewise:

apiVersion: v1
kind: Config
clusters:
- cluster:
    api-version: v1
    server: https://controller.my-kubenetes.dev:443
    certificate-authority: /etc/kubernetes/ca.crt
preferences:
  colors: true

I also volume-mounted a working kubeconfig to /root/.kube/config. The following error persists:

time="2017-05-23T08:59:37Z" level=error msg="Could not initialize scheduler hooks for kubernetes: the server has asked for the client to provide credentials (get nodes)"

@harsh-px : Can you help here?

@steigr We are releasing 1.2.4 release this week which totally removes requirement of this step. Are you able to wait for a week?

If not, we can work to resolve this.

Regarding kubernetes.yaml, you need to copy the kubeconfig that kubectl is using to /etc/pwx/kubernetes.yaml. The current-context being used in the kubeconfig needs to have permissions to list, get and update nodes.

Mapping kubeconfig to /etc/pwx/kubernetes.yaml works! Thanks a lot.