[root@ose0 ~]# oc create -f bwa2.yml
Error from server (BadRequest): error when creating "bwa2.yml": Pod in version "v1" cannot be handled as a Pod: only encoded map or array can be decoded into a struct[root@ose0 ~]#
[root@ose0 ~]#
[root@ose0 ~]# cat bwa2.yml
apiVersion: v1
kind: Pod
metadata:
name: bwa1
spec:
restartPolicy: OnFailure
volumes:
- name: bwa-data
persistentVolumeClaim: data-pvc
containers:
- name: bwa-bio
workingDir: /data
image: biocontainers/bwa
command: ["bwa"]
args: ["index","Homo_sapiens.GRCh38.dna.chromosome.16.fa"]
volumeMounts:
- name: bwa-data
mountPath: /data
Issue
其实是 persistentVolumeClaim的写法有问题,参见: https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.11/#persistentvolumeclaimvolumesource-v1-core