fix for: “kubernetes-MountVolume.SetUp failed for volume”
When setting up a new node in my kubernetes cluster, I got this error when a pod was trying to mount a volume for an nfs based storage class:
MountVolume.SetUp failed for volume "kube-api-access-vltks" : [failed to fetch token: serviceaccounts "traefik" is forbidden: User "system:node:node-1" cannot create resource "serviceaccounts/token" in API group "" in the namespace "kube-system": no relationship found between node 'node-1' and this object, failed to sync configmap cache: timed out waiting for the condition]
Usually this indicates that the node is missing libraries to support mounting the volume via nfs, in this case, the node was missing nfs-common
.
To fix:
- install nfs-common:
sudo apt-get install nfs-common
- restart the pod