capsule_template_version: 2017-06-21 # use "-" because that the fields have many items capsule_version: beta kind: capsule metadata: name: capsule-example labels: app: web nihao: baibai restart_policy: always spec: containers: - image: ubuntu command: - "/bin/bash" image_pull_policy: ifnotpresent workdir: /root labels: app: web ports: - name: nginx-port containerPort: 80 hostPort: 80 protocol: TCP resources: allocation: cpu: 1 memory: 1024 environment: PATCH: /usr/local/bin volumeMounts: - name: volume1 mountPath: /data1 readOnly: True - image: centos command: - "echo" args: - "Hello" - "World" image_pull_policy: ifnotpresent workdir: /root labels: app: web01 ports: - name: nginx-port containerPort: 80 hostPort: 80 protocol: TCP - name: mysql-port containerPort: 3306 hostPort: 3306 protocol: TCP resources: allocation: cpu: 1 memory: 1024 environment: NWH: /usr/bin/ volumeMounts: - name: volume2 mountPath: /data2 - name: volume3 mountPath: /data3 volumes: - name: volume1 cinder: size: 5 autoRemove: True - name: volume2 cinder: volumeID: 473e4a6a-99f2-4b42-88ce-5ab03a00b756 - name: volume3 cinder: volumeID: f4246aa1-1c87-479c-a2ab-4dbaf0c3c7bb