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 配置属性的时候,经常会有这种配置错误。。 因为缩进, 容易搞错,比如多或少一个空格。
 
 
 
 
 

相关文章:

  • 2022-02-14
  • 2022-01-23
  • 2021-07-03
  • 2021-09-18
  • 2022-12-23
  • 2021-08-02
  • 2022-12-23
  • 2021-12-29
猜你喜欢
  • 2021-09-04
  • 2022-02-28
  • 2022-12-23
  • 2021-11-02
  • 2021-08-07
  • 2022-01-04
  • 2021-08-04
相关资源
相似解决方案