【K8S】集群中部署nginx应用 运行手写yaml文件报错排查过程

2023-10-19 18:56:07 浏览数 (1)

❌报错信息

提取报错信息【 unknown field “spec.selector.replicas”】【 unknown field “spec.selector.template”】

代码语言:javascript复制
[root@master ~]# kubectl apply -f nginx-deployment.yaml
Error from server (BadRequest): error when creating "nginx-deployment.yaml": Deployment in version "v1" cannot be handled as a Deployment: strict decoding error: unknown field "spec.selector.replicas", unknown field "spec.selector.template"

0 人点赞