deployment 강제 정리
배경
- Default에서 리소스 사용 중인데, 특정 네임 스페이스에 추가 자원 할당
- 자원 모자라서 할당이 안됨
- 기존 namespace에서 삭제도 갑자기 막힘
Readiness probe failed: Get "<http://20.96.194.89:8080/readiness>": dial tcp 20.96.194.89:8080: connect: connection refused
error killing pod: failed to "KillPodSandbox" for "d1283a4d-b283-41b7-9c17-c2f5a7a004c6" with KillPodSandboxError: "rpc error: code = Unknown desc = failed to destroy network for sandbox \\"be886f2c24f90635871af83be985f2e595eaba64f90b7e82126be2e641db7d3a\\": plugin type=\\"calico\\" failed (delete): error getting ClusterInformation: connection is unauthorized: Unauthorized"
삭제 후 클러스터 점검
kubectl delete deployment app-1-2-2-1 --force --grace-period=0
kubectl delete pod app-1-2-2-1-6447dd7485-s4kmv --force --grace-period=0
kubectl delete pod app-1-2-2-1-6447dd7485-w67tm --force --grace-period=0
# 노드 상태 확인
kubectl get nodes
# 시스템 Pod들 상태 확인
kubectl get pods -n kube-system
# 전체 네임스페이스의 Pod 상태
kubectl get pods --all-namespaces
monitoring kube-state-metrics-86c66b4fcd-7pt96 2/3 ImagePullBackOff 0
간만에 켰을 때 시간 정리하기
배경
- 오랜만에 다시 켜서 UTM 가상머신의 시간이 잘못 설정됨
해결
sudo systemctl start chronyd
sudo systemctl enable chronyd