kubernetes-retired/external-storage

[nfs-provisioner] Running outside kubernetes (standalone)

uselessidbr opened this issue · 1 comments

Hello!

I'm trying to understand how the StorageClass/kubernetes will point to the nfs-provisioner (and the nfs server) running outside of the cluster (standalone or containerized).

Example:

sudo ./nfs-provisioner -provisioner=example.com/nfs
-kubeconfig=$HOME/.kube/config
-run-server=false
-use-ganesha=false
-enable-xfs-quota=true

I'm not sure how to set up, inside the kubernetes cluster, the ip address/hostname to the pointing to the nfs-provisioner.

Thanks in advance!

The kubeconfig integrates the nfs-provisioner with the Kubernetes Cluster (OKD in my case).

My setup was like this:

/usr/local/bin/nfs-provisioner -provisioner=nfs-server-hostname/nfs -master=https://cluster-api-address:8443 -kubeconfig=/root/.kube/config -use-ganesha=false -run-server=false -server-hostname=nfs-server-hostname -enable-xfs-quota=true -export-subnet=nfs-export-subnet

Then i deployed the ServiceAccount:

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

And the RBAC: https://github.com/kubernetes-incubator/external-storage/blob/master/nfs/deploy/kubernetes/rbac.yaml

After that, downloaded the kubeconfig of the SA nfs-provisioner and pointed the nfs-provisioner command line to load it.