Kubernetes PersistentVolumeClaim 401 Unable to authenticate you

I’m using the DigitalOcean Kubernetes and trying to deploy tiddlywiki with a volume ( I’ve got the following PVC definition:

apiVersion: v1
kind: PersistentVolumeClaim
  name: tiddlywiki-pvc
  - ReadWriteOnce
      storage: 1Gi
  storageClassName: do-block-storage

but the volume is not created. kubectl describe pvc tiddlywiki-pvc outputs:

  Type       Reason                Age                  From                                                                                                      Message
  ----       ------                ----                 ----                                                                                                      -------
  Normal     Provisioning          5m24s (x7 over 21m)  dobs.csi.digitalocean.com_master-k8s-1-13-2-do-1-fra1-1550947912278_82be847f-379c-11e9-b070-c26e25b214e8  External provisioner is provisioning volume for claim "default/tiddlywiki-pvc"
  Warning    ProvisioningFailed    5m24s (x7 over 21m)  dobs.csi.digitalocean.com_master-k8s-1-13-2-do-1-fra1-1550947912278_82be847f-379c-11e9-b070-c26e25b214e8  failed to provision volume with StorageClass "do-block-storage": rpc error: code = Internal desc = GET 401 Unable to authenticate you
  Normal     ExternalProvisioning  70s (x82 over 21m)   persistentvolume-controller                                                                               waiting for a volume to be created, either by external provisioner "" or manually created by system administrator

The 401 Unable to authenticate you could indicate that the API token isn’t present/expired, but I was able to create a PVC a few weeks ago on the same k8s cluster. Did anyone have a similar problem? Am I missing something or could it be a bug?

Submit an answer

This textbox defaults to using Markdown to format your answer.

You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

Sign In or Sign Up to Answer

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

Accepted Answer

OK, the problem was that removed API access for the cluster in API -> Access -> DigitalOcean applications. Obviously it’s created after you deploy a k8s and shouldn’t be touched.

Have the same problem, trying to solve it without success around 2 days…

Same problem but the API access is okay. I’m out of ideas so posting here in case anyone else has seen this problem but resolved it in a different way.