以DaemonSet类型为例
apiVersion: apps/v1
kind: DaemonSet
metadata:
name: trident
namespace: deepflow
spec:
selector:
matchLabels:
app: trident
template:
metadata:
annotations:
container.apparmor.security.beta.kubernetes.io/trident: unconfined
name: trident
namespace: deepflow
labels:
app: trident
spec:
hostNetwork: true
hostPID: true
containers:
- name: trident
image: deepflow-trident:1.5-1368.el7
imagePullPolicy: Never
securityContext:
privileged: true
volumeMounts:
- name: triconf
mountPath: /etc/trident/
resources:
resources:
cpu: "200m"
memory: "128Mi"
limits:
cpu: "1000m"
memory: "2048Mi"
volumes:
- name: triconf
configMap:
name: tridentconf
本文链接:
http://blog.ps-ef.cn/Kubernetes/155.html