Permalink
Switch branches/tags
Nothing to show
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
22 lines (21 sloc) 699 Bytes
# https://kubernetes.io/docs/tasks/inject-data-application/define-command-argument-container/
# https://kubernetes.io/docs/tasks/inject-data-application/define-environment-variable-container/
# https://cheatsheet.dennyzhang.com/kubernetes-yaml-templates
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", "DEMO_GREETING", "DEMO_FAREWELL"]
env:
- name: DEMO_GREETING
value: "Hello from the environment"
- name: DEMO_FAREWELL
value: "Such a sweet sorrow"
restartPolicy: OnFailure