例如,我可以使用以下 yaml 来生成具有多个容器的 pod:
apiVersion: v1
kind: Pod
metadata:
name: lampapp
labels:
app: app
spec:
containers:
- name: lampdb
image: mysql_test
- name: app
image: php-app-db-url-env
env:
- name: DB_URL
value: 127.0.0.1:3306
- name: app2
image: php-app-db-url-env
env:
- name: DB_URL
value: 127.0.0.1:3306