最后,我们需要DaemonSet来运行在集群中的所有实例:
- apiVersion: apps/v1
- kind: DaemonSet
- metadata:
- name: ping-exporter
- namespace: d8-system
- spec:
- updateStrategy:
- type: RollingUpdate
- selector:
- matchLabels:
- name: ping-exporter
- template:
- metadata:
- labels:
- name: ping-exporter
- spec:
- terminationGracePeriodSeconds: 0
- tolerations:
- - operator: "Exists"
- hostNetwork: true
- serviceAccountName: ping-exporter
- priorityClassName: cluster-low
- containers:
- - image: private-registry.flant.com/ping-exporter/ping-exporter:v1
- name: ping-exporter
- env:
- - name: MY_NODE_NAME
- valueFrom:
- fieldRef:
- fieldPath: spec.nodeName
- - name: PROMETHEUS_TEXTFILE_DIR
- value: /node-exporter-textfile/
- - name: PROMETHEUS_TEXTFILE_PREFIX
- value: ping-exporter_
- volumeMounts:
- - name: textfile
- mountPath: /node-exporter-textfile
- - name: config
- mountPath: /config
- volumes:
- - name: textfile
- hostPath:
- path: /var/run/node-exporter-textfile
- - name: config
- configMap:
- name: ping-exporter-config
- imagePullSecrets:
- - name: private-registry
(编辑:威海站长网)
【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!
|