- Pod : 한 개 이상의 container로 이루어진 component
- 1개의 Pod에 1개의 app이 있고, 트래픽 증가로 app이 scale up 해야할 때 pod 안에 app이 추가되는 것이 아닌 pod 가 추가됨.
- pod 내의 컨테이너 간에는 localhost로 통신이 가능하고, storage space도 share 가능함
Multi-container Pods
- 같은 pod 안의 container들은 같은 lifecycle, 같은 network(서로 localhost 통신 가능)와 storage 공간을 공유한다.
- definition의 spec.containers를 array 형태로 여러개의 컨테이너 선언할 수 있음.
InitContainers
- Pod가 running 상태가 되기 전에 초기에 실행되고 완료되는 container
- definition에 spec.initContainers로 선언
- 병렬로 실행하면 한 번에 한 containter씩 순서대로 실행됨
- 만약 initcontainer가 fail되면 k8s는 계속 pod restart 시킴
'CKA' 카테고리의 다른 글
Cluster Maintenance (0) | 2021.09.17 |
---|---|
Replication Controller & Replica Sets (0) | 2021.09.08 |
ConfigMap & Secrets (0) | 2021.09.08 |
Commands and Arguments (0) | 2021.09.08 |
Application Lifecycle Management (0) | 2021.09.08 |