7. Kubernetes 클러스터에서 ReplicaSet 배포
발행: (2026년 2월 17일 오전 11:30 GMT+9)
2 분 소요
원문: Dev.to
Source: Dev.to
실습 정보
Nautilus DevOps 팀은 마이그레이션을 위해 Kubernetes 클러스터에 애플리케이션을 배포할 준비를 하고 있습니다. 이번 작업에서는 다음 사양으로 ReplicaSet을 생성합니다:
- 이미지:
httpd:latest - ReplicaSet 이름:
httpd-replicaset - 라벨:
app=httpd_app,type=front-end - 컨테이너 이름:
httpd-container - 복제본 수:
4
참고:
jump_host에 있는kubectl유틸리티는 이미 Kubernetes 클러스터와 연동되도록 설정되어 있습니다.
ReplicaSet 매니페스트 (httpd-replicaset.yaml)
apiVersion: apps/v1
kind: ReplicaSet
metadata:
name: httpd-replicaset
labels:
app: httpd_app
type: front-end
spec:
replicas: 4
selector:
matchLabels:
app: httpd_app
type: front-end
template:
metadata:
labels:
app: httpd_app
type: front-end
spec:
containers:
- name: httpd-container
image: httpd:latest
ports:
- containerPort: 80
ReplicaSet 적용
kubectl apply -f httpd-replicaset.yaml
배포 확인
-
ReplicaSet이 생성되었는지 확인
kubectl get replicaset httpd-replicaset -
ReplicaSet이 만든 Pod 목록 확인
kubectl get pods -
ReplicaSet에 대한 상세 정보 조회
kubectl describe replicaset httpd-replicaset
자료 및 다음 단계
- 전체 코드 저장소: KodeKloud Learning Labs
- 추가 심층 학습: Whispering Cloud Insights
- 토론 참여: DEV Community
- LinkedIn 연결: LinkedIn Profile
크레딧
- 모든 실습은 KodeKloud에서 제공되었습니다.