2021-06-08 14:01:48 +00:00
|
|
|
apiVersion: apps/v1
|
|
|
|
kind: Deployment
|
|
|
|
metadata:
|
|
|
|
name: busybox-sleep
|
|
|
|
spec:
|
|
|
|
selector:
|
|
|
|
matchLabels:
|
2021-06-08 14:04:54 +00:00
|
|
|
app: busybox-sleep
|
2021-06-08 14:01:48 +00:00
|
|
|
replicas: 3
|
|
|
|
template:
|
|
|
|
metadata:
|
|
|
|
labels:
|
|
|
|
app: busybox-sleep
|
|
|
|
spec:
|
|
|
|
containers:
|
|
|
|
- name: busybox
|
|
|
|
image: busybox
|
|
|
|
args:
|
|
|
|
- sleep
|
|
|
|
- "1000000"
|
|
|
|
env:
|
|
|
|
- name: MY_NODE_NAME
|
|
|
|
valueFrom:
|
|
|
|
fieldRef:
|
|
|
|
fieldPath: spec.nodeName
|
|
|
|
- name: MY_POD_NAME
|
|
|
|
valueFrom:
|
|
|
|
fieldRef:
|
|
|
|
fieldPath: metadata.name
|
|
|
|
- name: MY_POD_NAMESPACE
|
|
|
|
valueFrom:
|
|
|
|
fieldRef:
|
|
|
|
fieldPath: metadata.namespace
|
|
|
|
- name: MY_POD_IP
|
|
|
|
valueFrom:
|
|
|
|
fieldRef:
|
|
|
|
fieldPath: status.podIP
|
2021-06-08 14:04:10 +00:00
|
|
|
- name: MY_POD_SERVICE_ACCOUNT
|
|
|
|
valueFrom:
|
|
|
|
fieldRef:
|
|
|
|
fieldPath: spec.serviceAccountName
|