Skip to Content
Cilium: 가동 및 실행 (Korean Edition)
book

Cilium: 가동 및 실행 (Korean Edition)

by Nico Vibert, Filip Nikolic, James Laverack
February 2026
Beginner to intermediate
372 pages
6h 12m
Korean
O'Reilly Media, Inc.
Content preview from Cilium: 가동 및 실행 (Korean Edition)

제12장. 네트워크 정책

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

네트워크 보안 제어 는 의도하지 않은 접근을 차단하고, 측면 이동을 중단하며, 조직 정책을 시행함으로써 워크로드를 보호하는 데 사용됩니다. 이 모든 작업은 네트워크 수준에서 수행될 수 있어 서로 다른 팀과 타사 애플리케이션 간 정책 조정의 필요성을 줄여줍니다. 기존 접근 방식은 쿠버네티스( ) 클라우드 네이티브 환경에서 구현하기 어렵습니다. 포드(Pod)와 서비스 IP는 예고 없이 변경될 수 있으며, 모든 포드는 일반적으로 동일한 CIDR 범위를 차지하므로 외부 네트워크 보안 장치는 서로 다른 워크로드의 트래픽을 구분할 수 없습니다.1

Cilium의 네트워크 정책 기능은 쿠버네티스 네트워크 정책( )의 확장으로서, 네임스페이스, 워크로드 라벨, 서비스 등 기존 쿠버네티스 개념과 깊이 통합된 클러스터 내 전통적 제어 수단의 대체 솔루션입니다.

이 장의 모든 매니페스트는 책의 GitHub 저장소 내 chapter12 디렉터리에 있습니다. 필요한 파일명은 참조 시 명시하며, 여기서는 중요한 부분만 보여드립니다.

기본 정책 생성

클러스터를 생성하고 Cilium을 배포하는 것부터 시작해 보겠습니다. 네트워크 정책 사용을 위해 특별한 구성은 필요하지 않지만, kind를 사용한 배포 예시는 이전 장을 참고하세요.

간단한 웹 서버(webserver.yaml)를 배포하고 네트워크 정책으로 보호하겠습니다. 이전 장과 마찬가지로 NGINX를 사용하되, 포트 8080에서는 텍스트를, 포트 9113에서는 메트릭스를 제공하도록 구성합니다. 포드에 app.kubernetes.io/name: webserver 라벨을 지정하여 나중에 정책에서 참조할 수 있도록 합니다. 또한 두 가지 서비스를 배포합니다: 포트 80을 포트 8080에 매핑하는 ClusterIP 서비스인 webserver와 포트 9113에 매핑하는 헤드리스 서비스인 webserver-metrics입니다. 테스트 클러스터에 배포하고 테스트 포드를 사용하면 네트워크 정책이 적용되지 않았을 때 어떤 응답을 하는지 확인할 수 있습니다:

$ kubectl apply --filename chapter12/webserver.yaml
deployment.apps/webserver created
configmap/nginx-config created
service/webserver created
service/webserver-metrics created

$ kubectl run test -it --rm --image nicolaka/netshoot -- bash

test:~# curl -sm1 webserver
Hello from Cilium Up and Running!

test:~# curl -s webserver-metrics:9113/metrics | grep ^nginx_http_requests_total
nginx_http_requests_total ...
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

트랜스포머 트랜스포머: 최종 가이드 (Korean Edition)

트랜스포머 트랜스포머: 최종 가이드 (Korean Edition)

Nicole Koenigstein

Publisher Resources

ISBN: 0642572338022