docs >> https://kubernetes.io/ko/docs/concepts/workloads/pods/
Create a pod called multi-pod
with two containers.Container 1, name: alpha
, image: nginx
Container 2: name: beta
, image: busybox
, command: sleep 4800
Environment Variables:container 1:name: alpha
Container 2:name: beta
Pod Name: multi-pod
Container 1: alpha
Container 2: beta
Container beta commands set correctly?
Container 1 Environment Value Set
Container 2 Environment Value Set
https://kubernetes.io/ko/docs/concepts/workloads/pods/
kubectl run multi-pod alpha --image=nginx --dry-run=client -o yaml > multi.yaml
apiVersion: v1
kind: Pod
metadata:
labels:
run: multi-pod
name: multi-pod
spec:
containers:
image: nginx
name: alpha
containers:
- command: ["sleep 4800"]
image: busybox
name: beta
---
apiVersion: v1
kind: Pod
metadata:
creationTimestamp: null
labels:
run: multi-pod
name: multi-pod
spec:
containers:
- image: nginx
name: alpha
env:
- name: name
value: alpha
- image: busybox
name: beta
command: ["sleep","4800"]
env:
- name: name
value: beta
확인
k describe pod multi-pod