persistentvolume/nfs-pv1 created
error: error parsing redis-pv.yaml: error converting YAML to JSON: yaml: line 8: did not find expected key
[root@master ~]# kubectl delete -f redis-pv.yaml
error: error parsing redis-pv.yaml: error converting YAML to JSON: yaml: line 10: did not find expected key
[root@master ~]# kubectl delete -f redis-pv.yaml
persistentvolume "nfs-pv1" deleted
error: error parsing redis-pv.yaml: error converting YAML to JSON: yaml: line 8: did not find expected key
[root@master ~]# kubectl delete -f redis-pv.yaml
# kubectl apply -f redis-headless-service.yaml
error: error validating "redis-headless-service.yaml": error validating data: ValidationError(Service): unknown field "app" in io.k8s.api.core.v1.Service; if you choose to ignore these errors, turn validation off with --validate=false
[root@master ~]# kubectl create -f redis.yaml
error: error validating "redis.yaml": error validating data: ValidationError(StatefulSet.spec.template.spec.volumes[0].configMap): unknown field "volumeClaimTemplates" in io.k8s.api.core.v1.ConfigMapVolumeSource; if you choose to ignore these errors, turn validation off with --validate=false
volumeClaimTemplates 不属于 StatefulSet.spec.template.spec.volumes
[root@master ~]# kubectl create -f redis.yaml
error: error validating "redis.yaml": error validating data: ValidationError(StatefulSet.spec.template.spec): unknown field "volumeClaimTemplates" in io.k8s.api.core.v1.PodSpec; if you choose to ignore these errors, turn validation off with --validate=false
volumeClaimTemplates 也不属于 StatefulSet.spec.template.spec
volumeClaimTemplates 直接属于 StatefulSet.spec !!
不熟悉 yml 配置属性的时候,经常会有这种配置错误。。 因为缩进, 容易搞错,比如多或少一个空格。