kubectl get pv

kubectl create clusterrole pv-reader --verb=get,list --resource=persistentvolumes

kubectl create clusterrolebinding pv-test --clusterrole=pv-reader --serviceaccount=web:default

cat <<EOF | kubectl apply --record -f -
apiVersion: v1
kind: Pod
metadata:
  name: curlpod
  namespace: web
spec:
  containers:
  - image: tutum/curl
    command: ["sleep", "3600"]
    name: main
  - image: linuxacademycontent/kubectl-proxy
    name: proxy
  restartPolicy: Always
EOF

kubectl exec -it curlpod -n web -- sh

curl localhost:8001/api/v1/persistentvolumes