2018-06-17 10:46:25 +08:00
|
|
|
---
|
|
|
|
apiVersion: v1
|
|
|
|
kind: ServiceAccount
|
|
|
|
metadata:
|
|
|
|
name: metrics-server
|
|
|
|
namespace: kube-system
|
|
|
|
---
|
2019-10-07 23:08:24 +08:00
|
|
|
apiVersion: apps/v1
|
2018-06-17 10:46:25 +08:00
|
|
|
kind: Deployment
|
|
|
|
metadata:
|
|
|
|
name: metrics-server
|
|
|
|
namespace: kube-system
|
|
|
|
labels:
|
|
|
|
k8s-app: metrics-server
|
|
|
|
spec:
|
|
|
|
selector:
|
|
|
|
matchLabels:
|
|
|
|
k8s-app: metrics-server
|
|
|
|
template:
|
|
|
|
metadata:
|
|
|
|
name: metrics-server
|
|
|
|
labels:
|
|
|
|
k8s-app: metrics-server
|
|
|
|
spec:
|
|
|
|
serviceAccountName: metrics-server
|
2018-10-05 09:47:03 +08:00
|
|
|
volumes:
|
|
|
|
# mount in tmp so we can safely use from-scratch images and/or read-only containers
|
|
|
|
- name: tmp-dir
|
|
|
|
emptyDir: {}
|
2018-06-17 10:46:25 +08:00
|
|
|
containers:
|
|
|
|
- name: metrics-server
|
2019-10-27 22:38:54 +08:00
|
|
|
#image: k8s.gcr.io/metrics-server-amd64:v0.3.6
|
|
|
|
image: mirrorgooglecontainers/metrics-server-amd64:v0.3.6
|
2018-06-22 18:01:43 +08:00
|
|
|
imagePullPolicy: IfNotPresent
|
2018-06-17 10:46:25 +08:00
|
|
|
command:
|
|
|
|
- /metrics-server
|
2018-10-05 09:47:03 +08:00
|
|
|
- --metric-resolution=30s
|
2018-10-06 10:21:04 +08:00
|
|
|
- --kubelet-insecure-tls
|
2018-10-05 09:47:03 +08:00
|
|
|
volumeMounts:
|
|
|
|
- name: tmp-dir
|
|
|
|
mountPath: /tmp
|