kubectl – Unable to create pvc.yaml file
i have created a pvc.yaml file but i am not able to add pvc to cluster as, i am facing a error for pvc.yaml file.
My pvc.yaml file content :
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
name: local-device-pvc
spec:
accessModes:
– ReadWriteOnce
resources:
requests:
storage: 5Gi
after creating pvc i am using the cmd below —*
kubctl create -f pvc.yaml
error message after cmd is —
error
error: error parsing pvc.yaml: error converting YAML to JSON: yaml: line 8: could not find expected ‘:’
i have used online yaml validater but still i am unable to solve this error.
i want my yaml file to be created and solve ther error syntax error: could not find expected ‘:’
Read more here: Source link