apiVersion: v1 kind: Service metadata: name: vmalert namespace: prometheus spec: selector: app: vmalert ports: - port: 8880 targetPort: 8880 --- apiVersion: apps/v1 kind: Deployment metadata: name: vmalert-deployment namespace: prometheus spec: replicas: 1 selector: matchLabels: app: vmalert strategy: type: Recreate template: metadata: labels: app: vmalert spec: containers: - name: vmalert image: victoriametrics/vmalert:v1.153.0 args: - -datasource.url=http://victoria-metrics.prometheus.svc.cluster.local:8428 - -remoteWrite.url=http://victoria-metrics.prometheus.svc.cluster.local:8428 - -notifier.url=http://prometheus-stack-kube-prom-alertmanager.prometheus.svc.cluster.local:9093 - -rule=/etc/vm/rules/*.yaml - -evaluationInterval=60s - -httpListenAddr=:8880 ports: - containerPort: 8880 readinessProbe: httpGet: path: /metrics port: 8880 initialDelaySeconds: 15 periodSeconds: 10 failureThreshold: 6 livenessProbe: httpGet: path: /metrics port: 8880 initialDelaySeconds: 60 periodSeconds: 30 failureThreshold: 3 volumeMounts: - name: rules mountPath: /etc/vm/rules readOnly: true resources: requests: cpu: "50m" memory: "64Mi" limits: cpu: "200m" memory: "256Mi" volumes: - name: rules configMap: name: prometheus-prometheus-stack-kube-prom-prometheus-rulefiles-0