feiskyer / kubernetes-handbook

Kubernetes Handbook (Kubernetes指南) https://kubernetes.feisky.xyz

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Missing "apiVersion" in file kubernetes-handbook/examples/projected-volume.yaml

wangluochao902 opened this issue · comments

Thanks for this helpful handbook. We are developing a tool to find potential bugs in Kubernetes configuration files. I found out a potential problem of the file kubernetes-handbook/examples/projected-volume.yaml. There is no "apiVersion" at line 20.
Also, I use "kubectl" to validate the file, after I run

kubectl apply -f kubernetes-handbook/examples/projected-volume.yaml --dry-run=true

I got the following error:

error: error validating "projected-volume.yaml": error validating data: apiVersion not set; if you choose to ignore these errors, turn validation off with --validate=false

Note the `apiVersion' field at line 48
Would you mind telling me it is a real error or not?

@wangluochao902 it's a bug, fixed now.