External-storage: NFS doesn't provision a pv for pvc request

Created on 7 Feb 2018  路  2Comments  路  Source: kubernetes-retired/external-storage

I practice create pvc absolutely as the guide given.
Things went well when I created the deployment, service and storage class, but the state of pvc is always pending.
And here is some output-information:

[root@node-1 nfs]# kubectl describe pvc nfs
Name: nfs
Namespace: default
StorageClass: example-nfs
Status: Pending
Volume:
Labels:
Annotations: volume.beta.kubernetes.io/storage-class=example-nfs
volume.beta.kubernetes.io/storage-provisioner=example.com/nfs
Finalizers: []
Capacity:
Access Modes:
Events:
Type Reason Age From Message
Normal ExternalProvisioning 0s (x63 over 15m) persistentvolume-controller waiting for a volume to be created, either by external provisioner "example.com/nfs" or manually created by system administrator

[root@node-1 nfs]# kubectl logs nfs-provisioner-c4f445d5-667h9

I0207 08:56:14.603999 1 main.go:65] Provisioner example.com/nfs specified
I0207 08:56:14.604960 1 main.go:85] Starting NFS server!
I0207 08:56:14.878221 1 server.go:139] starting RLIMIT_NOFILE rlimit.Cur 1048576, rlimit.Max 1048576
I0207 08:56:14.878962 1 server.go:150] ending RLIMIT_NOFILE rlimit.Cur 1048576, rlimit.Max 1048576
I0207 08:56:14.905332 1 controller.go:392] Starting provisioner controller c0bfaa29-0be4-11e8-83d0-0242ac110005!
E0207 08:56:14.913251 1 reflector.go:201] github.com/kubernetes-incubator/external-storage/lib/controller/controller.go:396: Failed to list *v1.PersistentVolumeClaim: persistentvolumeclaims is forbidden: User "system:serviceaccount:default:default" cannot list persistentvolumeclaims at the cluster scope
E0207 08:56:14.913356 1 reflector.go:201] github.com/kubernetes-incubator/external-storage/lib/controller/controller.go:397: Failed to list *v1.PersistentVolume: persistentvolumes is forbidden: User "system:serviceaccount:default:default" cannot list persistentvolumes at the cluster scope>

Did I forget anything or is there any config file need to be edit?

Most helpful comment

Sounds like you missed the RBAC part

All 2 comments

Sounds like you missed the RBAC part

@wzhliang yeah you're right! Many thanks!!!

Was this page helpful?
0 / 5 - 0 ratings