Question

Kubernetes PersistentVolumeClaim 401 Unable to authenticate you

I’m using the DigitalOcean Kubernetes and trying to deploy tiddlywiki with a volume (https://www.digitalocean.com/docs/kubernetes/how-to/add-volumes/). I’ve got the following PVC definition:

apiVersion: v1
kind: PersistentVolumeClaim
metadata:
  name: tiddlywiki-pvc
spec:
  accessModes:
  - ReadWriteOnce
  resources:
    requests:
      storage: 1Gi
  storageClassName: do-block-storage

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

Events:
  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 https://api.digitalocean.com/v2/volumes?name=pvc-062c18f0-41e7-11e9-9fb2-c26e25b214e8&region=fra1: 401 Unable to authenticate you
  Normal     ExternalProvisioning  70s (x82 over 21m)   persistentvolume-controller                                                                               waiting for a volume to be created, either by external provisioner "dobs.csi.digitalocean.com" 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.

Andrew.

Try DigitalOcean for free

Click below to sign up and get $200 of credit to try our products over 60 days!

Sign up

Get our biweekly newsletter

Sign up for Infrastructure as a Newsletter.

Hollie's Hub for Good

Working on improving health and education, reducing inequality, and spurring economic growth? We'd like to help.

Become a contributor

Get paid to write technical tutorials and select a tech-focused charity to receive a matching donation.

Welcome to the developer cloud

DigitalOcean makes it simple to launch in the cloud and scale up as you grow — whether you're running one virtual machine or ten thousand.

Learn more
DigitalOcean Cloud Control Panel