Pod with multiple images

Create a pod named xyz with a single container for each of the following images running inside there may be between 1 and 4 images specified +nginx+redis+Memcached+consul

Upvotes: 3

Views: 2028

Answers (1)

garlicFrancium
garlicFrancium

Reputation: 2269

Not quite clear from the question but assuming you want one pod having multiple containers, below is the sample manifest which can be used:

apiVersion: v1
kind: Pod
metadata:
  name: xyz
  labels:
    app: myapp
spec:
  containers:
  - name: container-1
    image: nginx
  - name: container-2
    image: redis
  - name: container-3
    image: Memcached
  - name: container-4
    image: consul 

There will be 4 different docker processes for 4 different containers but there will be only one pod containing four of them.

Upvotes: 2

Related Questions