Skip to Content
쿠버네티스를 활용한 클라우드 네이티브 데브옵스
book

쿠버네티스를 활용한 클라우드 네이티브 데브옵스

by 최경현, 저스틴 도밍거스, 존 어런들
December 2019
Beginner to intermediate
420 pages
8h 34m
Korean
Hanbit Media, Inc.
Content preview from 쿠버네티스를 활용한 클라우드 네이티브 데브옵스
234
쿠버네티스를 활용한 클라우드 네이티브 데브옵스
9.3.1
파드를 함께 배치하기
먼저 파드를 함께 스케줄링하는 경우를 알아보자.
app
:
server
레이블이 붙은 웹서버 파드와
app
:
cache
레이블이 붙은 콘텐츠 캐시 파드가 있다고 가정해보자. 두 개의 파드는 서로 다른
노드에 있어도 잘 작동하지만 같은 노드에 있다면 네트워크를 거치지 않고 통신할 수 있어 더
좋을 것이다. 스케줄러에게 두 개의 파드를 함께 배치하도록 요청하는 방법은 무엇일까?
다음은
server
파드 스펙의 일부로 파드 어피티니를 요청하는 예제다.
cache
파드 스펙에 설
정하거나
server
,
cache
파드 스펙 둘 다에서 파드 어피니티를 설정하더라도 결과는 동일
하다.
apiVersion: v1
kind: Pod
metadata:
name: server
labels:
app: server
...
spec:
affinity:
podAffinity:
requiredDuringSchedulingIgnoredDuringExecution:
labelSelector:
-
matchExpressions:
-
key: app
operator:
In
values:
["cache"]
topologyKey:
kubernetes.io/hostname
파드 어피니티의 요청으로 스케줄러는
server ...
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.
Start your free trial

You might also like

쿼커스 쿡북: 쿠버네티스를 위한 네이티브 자바 솔루션

쿼커스 쿡북: 쿠버네티스를 위한 네이티브 자바 솔루션

유동환, 알렉스 소토 부에노, 제이슨 포터

Publisher Resources

ISBN: 9791162248249