Quantcast
Channel: A Portal to a Portal
Viewing all articles
Browse latest Browse all 1850

What do YAML and COBOL have in common ?

$
0
0
They're both really really pedantic about columnar positioning ....

Whilst trying to create a Persistent Volume in my IBM Cloud Private (ICP) 3.1.1 cluster, using the following YAML: -

apiVersion: v1
kind: PersistentVolume
metadata:
  name: cam-mongo-pv
spec:
  capacity:
    storage: 15Gi
  accessModes:
    - ReadWriteMany
  nfs:
    server: dmhicp-boot.fyre.ibm.com
path: "/export/CAM_db"

the command: -


kubectl apply -f createCAM_PV1.yaml 

failed spectacularly with: -

error: error validating "createCAM_PV1.yaml": error validating data: [ValidationError(PersistentVolume): unknown field "path" in io.k8s.api.core.v1.PersistentVolume, ValidationError(PersistentVolume.spec.nfs): missing required field "path" in io.k8s.api.core.v1.NFSVolumeSource]; if you choose to ignore these errors, turn validation off with --validate=false

The solution was, of course, obvious .....

Yes, the path wasn't in line with the server element of the nfs section.

Bring back XML, all is forgiven !

Once I fixed my YAML: -

apiVersion: v1
kind: PersistentVolume
metadata:
  name: cam-mongo-pv
spec:
  capacity:
    storage: 15Gi
  accessModes:
    - ReadWriteMany
  nfs:
    server: dmhicp-boot.fyre.ibm.com
    path: "/export/CAM_db"

all was good :-)

kubectl apply -f createCAM_PV1.yaml 

persistentvolume/cam-mongo-pv created



Viewing all articles
Browse latest Browse all 1850

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>