Exam4Training

Create a pod that having 3 containers in it? (Multi-Container)

Create a pod that having 3 containers in it? (Multi-Container)
A . Solution:
image=nginx, image=redis, image=consul
Name nginx container as "nginx-container"
Name redis container as "redis-container"
Name consul container as "consul-container"
Create a pod manifest file for a container and append container section for rest of the images
kubectl run multi-container –generator=run-pod/v1 –image=nginx — dry-run -o yaml > multi-
container.yaml
# then
vim multi-container.yaml
apiVersion: v1
kind: Pod
metadata:

labels:
run: multi-container
name: multi-container
spec:
containers:
– image: nginx
name: nginx-container
– image: redis
name: redis-container
– image: consul
name: consul-container

restartPolicy: Always

Answer: A

Latest CKA Dumps Valid Version with 122 Q&As

Latest And Valid Q&A | Instant Download | Once Fail, Full Refund

Exit mobile version