10年 Java程序员,硬核人生!勇往直前,永不退缩!

欢迎围观我的git:https://github.com/R1310328554/spring_security_learn 寻找志同道合的有志于研究技术的朋友,关注本人微信公众号: 觉醒的码农,或Q群 165874185

  博客园  :: 首页  :: 新随笔  :: 联系 :: 订阅 订阅  :: 管理
 
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 配置属性的时候,经常会有这种配置错误。。 因为缩进, 容易搞错,比如多或少一个空格。
 
 
 
 
 

posted on 2021-01-20 07:16  CanntBelieve  阅读(1829)  评论(0编辑  收藏  举报