71 lines
1.7 KiB
YAML
71 lines
1.7 KiB
YAML
apiVersion: apps/v1
|
|
kind: Deployment
|
|
metadata:
|
|
labels:
|
|
k8s-app: dashboard-metrics-scraper
|
|
name: dashboard-metrics-scraper
|
|
namespace: devops
|
|
spec:
|
|
replicas: 1
|
|
revisionHistoryLimit: 1
|
|
selector:
|
|
matchLabels:
|
|
k8s-app: dashboard-metrics-scraper
|
|
template:
|
|
metadata:
|
|
labels:
|
|
k8s-app: dashboard-metrics-scraper
|
|
spec:
|
|
securityContext:
|
|
seccompProfile:
|
|
type: RuntimeDefault
|
|
dnsPolicy: ClusterFirst
|
|
hostNetwork: true
|
|
containers:
|
|
- name: dashboard-metrics-scraper
|
|
image: kubernetesui/metrics-scraper:v1.0.7
|
|
ports:
|
|
- containerPort: 8000
|
|
protocol: TCP
|
|
livenessProbe:
|
|
httpGet:
|
|
scheme: HTTP
|
|
path: /
|
|
port: 8000
|
|
initialDelaySeconds: 30
|
|
timeoutSeconds: 30
|
|
volumeMounts:
|
|
- mountPath: /tmp
|
|
name: tmp-volume
|
|
securityContext:
|
|
allowPrivilegeEscalation: false
|
|
readOnlyRootFilesystem: true
|
|
runAsUser: 1001
|
|
runAsGroup: 2001
|
|
serviceAccountName: kubernetes-dashboard
|
|
nodeSelector:
|
|
"kubernetes.io/os": linux
|
|
# Comment the following tolerations if Dashboard must not be deployed on master
|
|
tolerations:
|
|
- key: node-role.kubernetes.io/master
|
|
effect: NoSchedule
|
|
volumes:
|
|
- name: tmp-volume
|
|
emptyDir: {}
|
|
|
|
---
|
|
|
|
apiVersion: v1
|
|
kind: Service
|
|
metadata:
|
|
name: dashboard-metrics-scraper
|
|
namespace: devops
|
|
labels:
|
|
k8s-app: dashboard-metrics-scraper
|
|
spec:
|
|
ports:
|
|
- port: 8000
|
|
targetPort: 8000
|
|
name: dashboard-metrics-scrapper
|
|
selector:
|
|
k8s-app: dashboard-metrics-scraper |