๋ ์ด๋ธ ๊ฐ์ 'true' ๋๋ 'false'๋ก ์ค์ ํ์ฌ ๋ฆฌ์์ค๋ฅผ ์์ฑํ ์ ์๋ ๊ฒ ๊ฐ์ต๋๋ค.
๋ค์ yaml๋ก,
template:
metadata:
labels:
environment: test
release: false
tier: frontend
์ค๋ฅ๊ฐ ๋ฐ์ํฉ๋๋ค.
$ kubectl create -f replicaset.yaml
unable to decode "replicaset.yaml": [pos 341]: json: expect char '"' but got char 'f'
ํ์ง๋ง ๋ณ๊ฒฝ
template:
metadata:
labels:
environment: test
release: stable
tier: frontend
์ค๋ฅ ์์:
$ kubectl create -f replicaset.yaml
replicaset "replicaset" created
๋ ์ด๋ธ ๋ฌธ์์๋ ์ด ๊ฒฝ์ฐ๊ฐ ๋์ ์์ง ์์ต๋๋ค.
Valid label values must be 63 characters or less and must be empty or begin and end with an alphanumeric character ([a-z0-9A-Z]) with dashes (-), underscores (_), dots (.), and alphanumerics between.
'true'๋ฅผ ๋ ์ด๋ธ ๊ฐ์ผ๋ก ์ฌ์ฉํ๋ ์ฌ์ฉ ์ฌ๋ก๋ ์๋ฏธ ์๋ ๋ ์ด๋ธ ๊ฐ์ด ์๋ "Exist", "NotExist" ์ ํ๊ธฐ๋ฅผ ์ฌ์ฉํ๋ ๊ฒ์ ๋๋ค.
์์ง ํ ์คํธํ์ง ์์์ง๋ง yaml ํ์๊ฐ ๊ฐ์ ์ป๊ธฐ๋ ์ ์ ์ ๋ ฅ๋ ๋ถ์ธ ๊ฐ์ผ๋ก ๋ณํํ๋ฉด ์์ ํ๊ธฐ ์ฝ์ง ์์ ์ ์์ต๋๊น? ๊ทธ๋ ๋ค๋ฉด ์ง์ํ๊ณ ์ถ์ง ์๋ค๋ฉด ์ต์ํ ์ด๋ป๊ฒ๋ ๋ฌธ์ํํด์ผ ํ๋ค๊ณ ์๊ฐํฉ๋๋ค.
๋ ์ด๋ธ์ ๋ฌธ์์ด์ ๋๋ค.
๊ฒฌ์ ์ ๋ด์ญ์์ค.
@bgrant0607 ํ๋ก์ฐ
๊ฒฐ์ ๋.
๊ฐ์ฅ ์ ์ฉํ ๋๊ธ
๊ฒฌ์ ์ ๋ด์ญ์์ค.