82 lines
1.9 KiB
YAML
82 lines
1.9 KiB
YAML
apiVersion: apps/v1
|
|
kind: Deployment
|
|
metadata:
|
|
name: kube-state-metrics
|
|
namespace: monitoring
|
|
labels:
|
|
app: kube-state-metrics
|
|
spec:
|
|
replicas: 1
|
|
selector:
|
|
matchLabels:
|
|
app: kube-state-metrics
|
|
template:
|
|
metadata:
|
|
labels:
|
|
app: kube-state-metrics
|
|
annotations:
|
|
prometheus.io/scrape: "true"
|
|
prometheus.io/port: "8080"
|
|
spec:
|
|
serviceAccountName: kube-state-metrics
|
|
securityContext:
|
|
fsGroup: 65534
|
|
runAsNonRoot: true
|
|
runAsUser: 65534
|
|
containers:
|
|
- name: kube-state-metrics
|
|
image: registry.k8s.io/kube-state-metrics/kube-state-metrics:v2.10.1
|
|
args:
|
|
- "--port=8080"
|
|
- "--telemetry-port=8081"
|
|
ports:
|
|
- name: http-metrics
|
|
containerPort: 8080
|
|
protocol: TCP
|
|
- name: telemetry
|
|
containerPort: 8081
|
|
protocol: TCP
|
|
resources:
|
|
requests:
|
|
memory: "64Mi"
|
|
cpu: "50m"
|
|
limits:
|
|
memory: "128Mi"
|
|
cpu: "100m"
|
|
livenessProbe:
|
|
httpGet:
|
|
path: /healthz
|
|
port: 8080
|
|
initialDelaySeconds: 5
|
|
periodSeconds: 10
|
|
readinessProbe:
|
|
httpGet:
|
|
path: /
|
|
port: 8080
|
|
initialDelaySeconds: 5
|
|
periodSeconds: 10
|
|
---
|
|
apiVersion: v1
|
|
kind: Service
|
|
metadata:
|
|
name: kube-state-metrics
|
|
namespace: monitoring
|
|
labels:
|
|
app: kube-state-metrics
|
|
annotations:
|
|
prometheus.io/scrape: "true"
|
|
prometheus.io/port: "8080"
|
|
spec:
|
|
type: ClusterIP
|
|
ports:
|
|
- name: http-metrics
|
|
port: 8080
|
|
targetPort: http-metrics
|
|
protocol: TCP
|
|
- name: telemetry
|
|
port: 8081
|
|
targetPort: telemetry
|
|
protocol: TCP
|
|
selector:
|
|
app: kube-state-metrics
|