[Kubernetes] missing required field "selector" in io.k8s.api.apps.v1. turn validation off with --validate=false 에러 해결하기

Hailey·2020년 10월 10일
2

Kubernetes

목록 보기
5/6

다음과 같은 에러가 발생합니다.

missing required field "selector" in io.k8s.api.apps.v1.DeploymentSpec; if you choose to ignore these errors, turn validation off with --validate=false

구 버전의 경우 다음과 같이 yaml에 selector가 없이 구성되었기 때문에
해당 문제가 발생합니다.

첫번째 spec: replicas: 아래에 selector를 추가해줍니다.

-표시는 띄어쓰기 입니다.
spec:
---replicas: 1
---selector:
----matchLabels:
-----app: [Your app name]
---template:
----metadata:
-----labels:


에러가 해결되었다

profile
Business & Software 💗🌎

0개의 댓글