portworx / px-dev

PX-Developer is scale-out storage for containers. Run Cassandra, Jenkins, or any application in Docker, with enterprise storage functionality on commodity servers
270 stars 83 forks source link

Document where and how to provide kubernetes credentials #31

Closed steigr closed 7 years ago

steigr commented 7 years ago

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)"
venkatpx commented 7 years ago

@harsh-px : Can you help here?

harsh-px commented 7 years ago

@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.

steigr commented 7 years ago

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