Kubernetes: 'true' ๋ฐ 'false'๋ฅผ ๋ ˆ์ด๋ธ” ๊ฐ’์œผ๋กœ ์‚ฌ์šฉํ•  ์ˆ˜ ์—†์Šต๋‹ˆ๋‹ค.

์— ๋งŒ๋“  2016๋…„ 03์›” 20์ผ  ยท  3์ฝ”๋ฉ˜ํŠธ  ยท  ์ถœ์ฒ˜: kubernetes/kubernetes

๋ ˆ์ด๋ธ” ๊ฐ’์„ '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 ํŒŒ์„œ๊ฐ€ ๊ฐ’์„ ์–ป๊ธฐ๋„ ์ „์— ์ž…๋ ฅ๋œ ๋ถ€์šธ ๊ฐ’์œผ๋กœ ๋ณ€ํ™˜ํ•˜๋ฉด ์ˆ˜์ •ํ•˜๊ธฐ ์‰ฝ์ง€ ์•Š์„ ์ˆ˜ ์žˆ์Šต๋‹ˆ๊นŒ? ๊ทธ๋ ‡๋‹ค๋ฉด ์ง€์›ํ•˜๊ณ  ์‹ถ์ง€ ์•Š๋‹ค๋ฉด ์ตœ์†Œํ•œ ์–ด๋–ป๊ฒŒ๋“  ๋ฌธ์„œํ™”ํ•ด์•ผ ํ•œ๋‹ค๊ณ  ์ƒ๊ฐํ•ฉ๋‹ˆ๋‹ค.

siapi-machinery

๊ฐ€์žฅ ์œ ์šฉํ•œ ๋Œ“๊ธ€

๊ฒฌ์ ์„ ๋‚ด์‹ญ์‹œ์˜ค.

๋ชจ๋“  3 ๋Œ“๊ธ€

๋ ˆ์ด๋ธ”์€ ๋ฌธ์ž์—ด์ž…๋‹ˆ๋‹ค.

๊ฒฌ์ ์„ ๋‚ด์‹ญ์‹œ์˜ค.

@bgrant0607 ํŒ”๋กœ์šฐ
๊ฒฐ์ •๋œ.

์ด ํŽ˜์ด์ง€๊ฐ€ ๋„์›€์ด ๋˜์—ˆ๋‚˜์š”?
0 / 5 - 0 ๋“ฑ๊ธ‰