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에서 제공되었습니다.
0 조회
Back to Blog

관련 글

더 보기 »

내가 직접 AWS 배포 도구를 만든 이유

더 빠른 Serverless Deployment Tool을 만들기 위한 나의 여정 나는 12년 이상의 경력을 가진 소프트웨어 엔지니어로, 다양한 언어와 팀, 그리고 수십 개의 프로젝트에서 일해 왔습니다.