问答详情
源自:4-1 k8s集群初体验

kubectl create -f hello-deployment.yaml 时报错

老师好:

报错配置文件和课件一样

error: error validating "hello-deployment.yaml": error validating data: ValidationError(Deployment.spec): missing required field "selector" in io.k8s.api.apps.v1.DeploymentSpec; if you choose to ignore these errors, turn validation off with --validate=false

提问者:慕数据122197 2020-06-18 14:38

个回答

  • qq_飘羽_2
    2020-09-07 14:43:42

    应该是yaml文件中出现了问题,请仔细查看一下yaml文件中的参数和格式。