running pod 수정법
2023. 4. 26. 21:07ㆍKubernetes
running 상태의 pod는 아래사항은 수정이 불가하다.
- spec.container.image
- spec.initContainers.image
- spec.activeDeadlineSeconds
-spec.tolerations
따라서, 수정하면 아래처럼 에러가난다.
해결방법은 2가지가 있다.
1. tmp 로 pod 수정
kubectl edit pod <pod name>
kubectl delete pod webapp
kubectl create -f /tmp/kubectl-edit-ccvrq.yaml
1-2. tmp, replace로 수정
kubectl edit pod <pod name>
kubectl replace --force -f /tmp/kubectl-edit-ccvrq.yaml
2. newpod.yaml 생성
kubectl get pod webapp -o yaml > newpod.yaml
vi newpod.yaml
kubectl delete pod webapp
kubectl create -f newpod.yaml
'Kubernetes' 카테고리의 다른 글
왜 Bamboo 에서 tekton & argocd 로 바꿔야하는가? (0) | 2023.06.22 |
---|---|
[kubernetes] pod의 DNS 접근이 안될때는 ingress를 째려보자 (0) | 2023.05.04 |
imperative Test (0) | 2023.04.19 |
Load balancer (0) | 2023.04.17 |
Cluster IP (0) | 2023.04.17 |