Error while using local persistent volumes in statefulset pod
it was a silly mistake. I was mentioning my-node
in node name values in pv
files. Modifying it to correct node name solved my issue.
Thanks for sharing! I did the same mistake. I guess the k8s docu could state this a bit clearer (though it's quite obviuos), so it's a copy paste pitfall.
And to be a bit clearer: if you have a cluster with 3 nodes, then you need to create three different named PVs and provide the correct nodename for 'my-node' (kubectl get nodes). The only reference between your volumeClaimTemplate and your PV is the name of the storage class.
I took something like "local-pv-node-X" as PV name, so when I look at the PV section in the kubernetes dashboard, I can see directly where this volume is located on.
You migh update your listing with the hint on 'my-note ;-)