apiVersion: v1
kind: Pod
metadata:
name: command-demo
labels:
purpose: demonstrate-command
spec:
containers:
- name: command-demo-container
image: debian
command: ["printenv"] # 컨테이너 실행시 실행할 명령어
args: ["HOSTNAME", "KUBERNETES_PORT"] # 명령어에 넘길 매개변수
restartPolicy: OnFailure
env:
- name: MESSAGE
value: "hello world"
command: ["/bin/echo"]
args: ["$(MESSAGE)"]
$ 달러 표시 사용