Files
home-cluster-ops/kubernetes/infrastructure/prometheus-node-exporter/app/deployment.yaml
2024-06-26 21:51:32 +10:00

44 lines
1.1 KiB
YAML

apiVersion: apps/v1
kind: Deployment
metadata:
name: prometheus-node-exporter
namespace: prometheus
labels:
app: prometheus-node-exporter
spec:
replicas: 3
selector:
matchLabels:
app: prometheus-node-exporter
template:
metadata:
labels:
app: prometheus-node-exporter
spec:
hostNetwork: true
hostPID: true
topologySpreadConstraints:
- maxSkew: 1
topologyKey: kubernetes.io/hostname
whenUnsatisfiable: DoNotSchedule
labelSelector:
matchLabels:
app: prometheus-node-exporter
securityContext:
runAsUser: 0
runAsGroup: 0
containers:
- name: prometheus-node-exporter
image: prom/node-exporter
args:
- "--path.rootfs=/host"
volumeMounts:
- name: node-volume
mountPath: /host
readOnly: true
mountPropagation: HostToContainer
volumes:
- name: node-volume
hostPath:
path: /
type: Directory