带有多张图片的广告连播 [英] Pod with multiple images
问题描述
为每个内部运行的以下图像创建一个带有单个容器的名为xyz的容器,其中可能会指定1到4张图像+ nginx + redis + Memcached + consul
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
推荐答案
这个问题不太清楚,但是假设您想要一个具有多个容器的吊舱,下面是可以使用的示例清单:
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
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
对于4个不同的容器,将有4个不同的docker进程,但是只有一个包含其中四个的pod.
There will be 4 different docker processes for 4 different containers but there will be only one pod containing four of them.
这篇关于带有多张图片的广告连播的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!