전공공부
[K8S - CKA] Multi Container Pods 본문
1. Multi Container Pods
Log Agent와 Server가 같이 Pair로 업로드 되는 경우가 필요 할 것이다.
함께 생성되고 함께 파괴가 된다는 생각으로 바라보는것이 좋을 것 같다.
Volume Sharing 등의 설정을 하지 않아도 되니 편하다.
Pod의 spec.containers 아래에 배열 형태로 나누어서 container 1,2...로 나누어서 배포하면된다.
apiVersion: v1
kind: Pod
metadata:
name: cpu-demo-2
namespace: cpu-example
spec:
containers:
- name: cpu-demo-ctr-2
image: vish/stress
- name: test
image: nginx
'Study > K8S' 카테고리의 다른 글
[K8S - CKA] OS Upgrade (0) | 2023.11.12 |
---|---|
[K8S - CKA] initContainers (0) | 2023.11.12 |
[K8S - CKA] Configure Secrets in Applications (1) | 2023.11.12 |
[K8S - CKA] Application Commands (0) | 2023.11.05 |
[K8S] 서로 다른 네임스페이스 Pod간 볼륨을 공유하는 방법 (0) | 2023.11.04 |