Skip to content

Commit f8b0cb7

Browse files
committed
add examples
Signed-off-by: mickeyzzc <[email protected]>
1 parent 82f5679 commit f8b0cb7

File tree

1 file changed

+59
-0
lines changed

1 file changed

+59
-0
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,59 @@
1+
apiVersion: apps/v1
2+
kind: Deployment
3+
metadata:
4+
labels:
5+
app.kubernetes.io/component: exporter
6+
app.kubernetes.io/name: kube-state-metrics
7+
app.kubernetes.io/version: 2.10.0
8+
name: kube-state-metrics-pods
9+
namespace: kube-system
10+
spec:
11+
replicas: 1
12+
selector:
13+
matchLabels:
14+
app.kubernetes.io/name: kube-state-metrics
15+
template:
16+
metadata:
17+
labels:
18+
app.kubernetes.io/component: exporter
19+
app.kubernetes.io/name: kube-state-metrics
20+
app.kubernetes.io/version: 2.10.0
21+
spec:
22+
automountServiceAccountToken: true
23+
containers:
24+
- args:
25+
- --resources=pods
26+
- --node=""
27+
- --enable-no-node-scrape
28+
image: registry.k8s.io/kube-state-metrics/kube-state-metrics:v2.10.0
29+
livenessProbe:
30+
httpGet:
31+
path: /healthz
32+
port: 8080
33+
initialDelaySeconds: 5
34+
timeoutSeconds: 5
35+
name: kube-state-metrics
36+
ports:
37+
- containerPort: 8080
38+
name: http-metrics
39+
- containerPort: 8081
40+
name: telemetry
41+
readinessProbe:
42+
httpGet:
43+
path: /
44+
port: 8081
45+
initialDelaySeconds: 5
46+
timeoutSeconds: 5
47+
securityContext:
48+
allowPrivilegeEscalation: false
49+
capabilities:
50+
drop:
51+
- ALL
52+
readOnlyRootFilesystem: true
53+
runAsNonRoot: true
54+
runAsUser: 65534
55+
seccompProfile:
56+
type: RuntimeDefault
57+
nodeSelector:
58+
kubernetes.io/os: linux
59+
serviceAccountName: kube-state-metrics

0 commit comments

Comments
 (0)