![[인프런 워밍업 클럽 4기] 미션 4. PVC/PV, Deployment 등 응용과제](https://cdn.inflearn.com/public/files/blogs/74340a11-ff4d-4e4c-9907-6ddd36856c80/쿠버네티스_데브옵스_썸네일.jpg)
[인프런 워밍업 클럽 4기] 미션 4. PVC/PV, Deployment 등 응용과제
2개월 전
1. PV, PVC - search
▶ 1~4. local 동작 확인
// 2번 - Container 임시 폴더 확인
// 2번 - Container 영구저장 폴더 확인
// 2번 - master node 폴더 확인
▶ 5. hostPath 동작 확인 - Deployment 수정 후 [1~4] 실행
// 2번 - Container 임시 폴더 확인
// 2번 - Container 영구저장 폴더 확인
// 2번 - master node 폴더 확인
2. Deployment - search
▶ 1. RollingUpdate 하기
▶ 2. RollingUpdate (maxUnavailable: 0%, maxSurge: 100%) 하기
spec:
replicas: 2
strategy:
type: RollingUpdate
rollingUpdate:
maxUnavailable: 25% -> 0% # 수정
maxSurge: 25% -> 100% # 수정
▶ 3. Recreate 하기 (기존 파드 없애고 한번에 교체)
spec:
replicas: 2
strategy:
type: RollingUpdate -> Recreate # 수정
rollingUpdate: # 삭제
maxUnavailable: 0% # 삭제
maxSurge: 100% # 삭제
▶ 4. Rollback
kubectl rollout undo -n anotherclass-123 deployment/api-tester-1231
3. Service - search
▶ 1. Pod 내부에서 Service 명으로 API 호출 [서비스 디스커버리]
▶ 2. Deployment에서 Pod의 ports 전체 삭제, Service targetPort를 http -> 8080으로 수정
▶ 2. 그리고 다시 Pod 내부에서 Service 명으로 API 호출
(새로 생성된 파드에서 실행)
4. HPA - search
▶ 1. 부하 발생
▶ 1. 부하 확인
댓글을 작성해보세요.