$ kubectl run zabbix-agent --image=zabbix-agent --port=10050 --privileged=true --labels="app=zabbix-aget" --image-pull-policy=IfNotPresent --restart=Always --env="ZBX_SERVER_HOST=zabbix-server" --dry-run=client -o yaml > zabbix-agent.yaml
- zabbix-agent.yaml
apiVersion: v1
kind: Pod
metadata:
creationTimestamp: null
labels:
app: zabbix-aget
name: zabbix-agent
spec:
containers:
- env:
- name: ZBX_SERVER_HOST
value: zabbix-server
image: zabbix-agent
imagePullPolicy: IfNotPresent
name: zabbix-agent
ports:
- containerPort: 10050
resources: {}
securityContext:
privileged: true
dnsPolicy: ClusterFirst
restartPolicy: Always
status: {}