Hi Guys,
I am trying to create one persistent volume claim in kubernetes. But it shows me the below error.
$ kubectl apply -f pvc.yml
The PersistentVolumeClaim "Pvc-volume" is invalid: metadata.name: Invalid value: "Pvc-volume": a DNS-1123 subdomain must consist of lower case alphanumeric characters, '-' or '.', and must start and end with an alphanumeric character (e.g. 'example.com', regex used for validation is '[a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*')
Here I have created one yml file as given below.
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
name: Pvc-volume
labels:
name: Pvc-volume
spec:
accessModes:
- ReadWriteOnce
resources:
requests:
storage: 3Gi