Skip to Content
공인 쿠버네티스 관리자(CKA) 학습 가이드 (Korean Edition), 2nd Edition
book

공인 쿠버네티스 관리자(CKA) 학습 가이드 (Korean Edition), 2nd Edition

by Benjamin Muschko
January 2026
Beginner to intermediate
392 pages
5h 51m
Korean
O'Reilly Media, Inc.
Content preview from 공인 쿠버네티스 관리자(CKA) 학습 가이드 (Korean Edition), 2nd Edition

제17장. 서비스

이 작품은 AI를 사용하여 번역되었습니다. 여러분의 피드백과 의견을 환영합니다: translation-feedback@oreilly.com

"네트워크 통신을 위한 Pod의 IP 주소 사용"에서 Pod의 IP 주소로 통신할 수 있다는 점을 배웠습니다.. Pod가 재시작되면 새로운 가상 클러스터 IP 주소가 자동으로 할당됩니다.. 따라서 시스템의 다른 부분들이 서로 통신해야 할 경우 Pod의 IP 주소에 의존할 수 없습니다.

마이크로서비스 아키텍처 구축 에서 각 구성 요소가 자체 포드에서 실행되며 안정적인 네트워크 인터페이스를 통해 서로 통신해야 하는 경우, 서비스라는 다른 기본 요소가 필요합니다.

서비스는 포드 위에 추상화 계층을 구현하여 일치하는 레이블을 가진 모든 포드 앞에 고정된 가상 IP를 할당하며, 이 가상 IP를 클러스터 IP라고 합니다. 이 장에서는 서비스의 세부 사항, 특히 선언된 유형에 따라 클러스터 내부 및 외부에서 포드를 노출하는 방법에 중점을 둘 것입니다.

미니큐브에서 서비스 접근하기

NodePort 및 LoadBalancer 유형의 서비스에 minikube 로 접근하려면 특별한 처리가 필요합니다. 자세한 지침은 문서를 참조하십시오.

서비스 작업

간단히 말해, 서비스는 일련의 파드에 발견 가능한 이름과 부하 분산을 제공합니다. 서비스는 쿠버네티스 DNS 제어 평면 구성 요소 의 도움으로 IP 주소와 무관하게 유지되며, 이 부분은 "DNS 조회로 서비스 발견하기"에서 논의할 예정입니다 . 배포(Deployment)와 유사하게, 서비스는 레이블 선택 의 도움으로 작동할 파드를 결정합니다 .

그림 17-1은 이 기능을 보여줍니다. Pod 1은 할당된 라벨이 서비스에 정의된 라벨 선택과 일치하므로 트래픽을 수신합니다. Pod 2는 일치하지 않는 라벨을 정의하므로 트래픽을 수신하지 않습니다.

Diagram illustrating service traffic routing where Pod 1 receives traffic due to matching label selection, while Pod 2 does not.
그림 17-1. 레이블 선택에 따른서비스 트래픽 라우팅

다른 시나리오를 지원하기 위해 라벨 선택기 없이 서비스를 생성할 수도 있습니다. 자세한 내용은 관련 쿠버네티스 문서를 참조하십시오.

서비스와 배포

서비스는 배포(Deployment) 의 보완 개념입니다. 서비스는 네트워크 트래픽을 포드 집합으로 라우팅하고, 배포는 복제본(replica)으로 구성된 포드 집합 관리를 복제 집합(ReplicaSet)에 위임합니다. 두 개념을 독립적으로 사용할 수 있지만, 배포와 서비스를 함께 사용하는 것이 권장됩니다. 주요 이유는 복제본 수를 확장하는 동시에 해당 포드로 네트워크 트래픽을 유도할 엔드포인트를 노출할 수 있기 때문입니다. ...

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.

Read now

Unlock full access

More than 5,000 organizations count on O’Reilly

AirBnbBlueOriginElectronic ArtsHomeDepotNasdaqRakutenTata Consultancy Services

QuotationMarkO’Reilly covers everything we've got, with content to help us build a world-class technology community, upgrade the capabilities and competencies of our teams, and improve overall team performance as well as their engagement.
Julian F.
Head of Cybersecurity
QuotationMarkI wanted to learn C and C++, but it didn't click for me until I picked up an O'Reilly book. When I went on the O’Reilly platform, I was astonished to find all the books there, plus live events and sandboxes so you could play around with the technology.
Addison B.
Field Engineer
QuotationMarkI’ve been on the O’Reilly platform for more than eight years. I use a couple of learning platforms, but I'm on O'Reilly more than anybody else. When you're there, you start learning. I'm never disappointed.
Amir M.
Data Platform Tech Lead
QuotationMarkI'm always learning. So when I got on to O'Reilly, I was like a kid in a candy store. There are playlists. There are answers. There's on-demand training. It's worth its weight in gold, in terms of what it allows me to do.
Mark W.
Embedded Software Engineer

You might also like

Cilium: 가동 및 실행 (Korean Edition)

Cilium: 가동 및 실행 (Korean Edition)

Nico Vibert, Filip Nikolic, James Laverack

Publisher Resources

ISBN: 0642572314699