Resizing PVC for a Kubernetes Statefulset

Ellie Huxtable

Kubernetes StatefulSet의 PVC 크기 조정하기

원문은 Ellie Huxtable님이 에 게재했습니다. 이 블로그 구독하기

데이터베이스 배포(또는 비슷한 경우)를 위해 Kubernetes StatefulSet PVC 크기를 조정해 본 적이 있다면 아마 다음 오류를 본 적이 있을 것입니다

Internal server error

StatefulSet.apps "es-cluster" is invalid: spec: Forbidden: updates to statefulset > spec for fields other than 'replicas', 'template', and 'updateStrategy' are forbidden.

  1. 모든 PVC를 수동으로 수정합니다: kubectl edit pvc -n <namespace> <name>
  2. StatefulSet을 삭제하되 Pod는 계속 실행되도록 둡니다: kubectl delete -n <namesapce> statefulset --cascade=orphan <name>
  3. StatefulSet을 다시 생성합니다: helm upgrade, kubectl apply 또는 평소에 배포할 때 사용하는 다른 방식으로
  4. 모든 Pod를 재배포하도록 StatefulSet을 재시작합니다 kubectl rollout restart statefulset -n namespace <name>

이 글은 muse-spark-1.2-contributor 모델을 사용해 번역했습니다.

댓글