μμ½
namespace=<λ€μμ€νμ΄μ€>
daemonset_name=<λ°λͺ¬μ
λ°°ν¬ λͺ
>
# λ°λͺ¬μ
νλ 0μΌλ‘ μ‘°μ
kubectl -n "${namespace}" patch daemonset "${daemonset_name}" -p '{"spec": {"template": {"spec": {"nodeSelector": {"non-existing": "true"}}}}}'
# λ°λͺ¬μ
νλ μ¬μ€ν
kubectl -n "${namespace}" patch daemonset "${daemonset_name}" --type json -p='[{"op": "remove", "path": "/spec/template/spec/nodeSelector/non-existing"}]'μ΄μ
Statefulset μ΄λ Replicaset μ scale μ μ¬μ©νμ¬ νλλ₯Ό λͺ¨λ μ’
λ£νκ±°λ μνλ μ¬μ΄μ¦λ‘ μ‘°μ μ΄ κ°λ₯νλ€.
kubectl scale --replicas <μνλ μ«μ> -n <λ€μμ€νμ΄μ€> statefulset <statefulset λ€μ>Daemonset μ scale νλ€λ κ²μ λ§μ΄ μλμ§λ§ (κΈ°λ³Έμ μΌλ‘ λ
Έλ λΉ 1κ°μ νλλ₯Ό ꡬλνλ ννμ΄λ―λ‘) PVC λ³Όλ₯¨μ κ΅μ²΄νλ€κ±°λ κΈ°λ₯μ μΌμ μ€λ¨νκΈ° μν΄μ λͺ¨λ νλλ₯Ό μ μ κΊΌμΌνλ μν©μ΄ μκ²Όμ λμ μ²λ¦¬ λ°©λ²μ΄ νμνλ€.
ν΄κ²°
ν΄λΉ λ°λͺ¬μ
λͺ
μΈμ nodeSelector λ₯Ό μμ νμ¬ ν΄λΉνλ λ
Έλκ° μμ μ‘΄μ¬νμ§ μλλ‘ νμ¬ μ 체 λ
Έλμ μ‘΄μ¬νλ λ°λͺ¬μ
νλλ₯Ό μμ ν μ μλ€.
(μ΄λ° μμΌλ‘ μμ©ν μ μμκ±°λΌκ³€ μκ°μ§λ λͺ»νλ€.. μμ°)
namespace=<λ€μμ€νμ΄μ€>
daemonset_name=<λ°λͺ¬μ
λ°°ν¬ λͺ
>
# λ°λͺ¬μ
νλ 0μΌλ‘ μ‘°μ
kubectl -n "${namespace}" patch daemonset "${daemonset_name}" -p '{"spec": {"template": {"spec": {"nodeSelector": {"non-existing": "true"}}}}}'
# λ°λͺ¬μ
νλ μ¬μ€ν
kubectl -n "${namespace}" patch daemonset "${daemonset_name}" --type json -p='[{"op": "remove", "path": "/spec/template/spec/nodeSelector/non-existing"}]'