kubernetes-retired/external-storage

[nfs-provisioner] out of cluster - the server has asked for the client to provide credentials

uselessidbr opened this issue · 1 comments

Hello!

I'm trying to setup the nfs-provisioner out of the cluster (Openshift in this case) as a binary but i cant start the server as it can't load the webpage "https://okd.openshift.local:8443/version" throwing the error:

F0302 15:23:51.025476 3102 main.go:128] Error getting server version: the server has asked for the client to provide credentials

The command i used to run nfs-provisioner:

[root@nfs]# nfs-provisioner -provisioner=nfs1.openshift.local/nfs -kubeconfig=$HOME/.kube/config -run-server=false -use-ganesha=false -server-hostname=nfs.openshift.local -enable-xfs-quota=true

I0302 15:23:50.998332 3102 main.go:64] Provisioner lnciasc-okd-storage-nfs2.intranet.ciasc.gov.br/nfs specified
F0302 15:23:51.025476 3102 main.go:128] Error getting server version: the server has asked for the client to provide credentials

The same happens if i try with -master option.

Any way i can set the username and password?

Fixed it by deploying the RBAC (https://github.com/kubernetes-incubator/external-storage/blob/master/nfs/deploy/kubernetes/rbac.yaml) and the service account:

apiVersion: v1
kind: ServiceAccount
metadata:
  name: nfs-provisioner
  namespace: default

After that, i downloaded the kubeconfig (from OKD's WEB Interface) for the nfs-provisioner service account and used it at the nfs-provisioner command line.