示例Pod 的配置文件
envars.yaml Copy envars.yaml to clipboard
apiVersion: v1
kind: Pod
metadata:
name: envar-demo
labels:
purpose: demonstrate-envars
spec:
containers:
- name: envar-demo-container
image: busybox
env:
- name: DEMO_GREETING
value: "Hello from the environment"
- name: DEMO_FAREWELL
value: "Such a sweet sorrow"
在 shell 中,运行 printenv 命令列出环境环境变量