2019-11-05 21:30:50 +00:00
|
|
|
---
|
|
|
|
apiVersion: v1
|
|
|
|
kind: ServiceAccount
|
|
|
|
metadata:
|
|
|
|
name: metrics-server
|
|
|
|
namespace: kube-system
|
|
|
|
---
|
|
|
|
apiVersion: apps/v1
|
|
|
|
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:
|
2020-11-19 22:43:49 +00:00
|
|
|
priorityClassName: "system-node-critical"
|
2019-11-05 21:30:50 +00:00
|
|
|
serviceAccountName: metrics-server
|
2020-01-08 21:09:20 +00:00
|
|
|
tolerations:
|
|
|
|
- key: "CriticalAddonsOnly"
|
|
|
|
operator: "Exists"
|
2020-12-02 19:54:13 +00:00
|
|
|
- key: "node-role.kubernetes.io/control-plane"
|
|
|
|
operator: "Exists"
|
|
|
|
effect: "NoSchedule"
|
2020-01-08 21:09:20 +00:00
|
|
|
- key: "node-role.kubernetes.io/master"
|
|
|
|
operator: "Exists"
|
|
|
|
effect: "NoSchedule"
|
2019-11-05 21:30:50 +00:00
|
|
|
volumes:
|
|
|
|
# mount in tmp so we can safely use from-scratch images and/or read-only containers
|
|
|
|
- name: tmp-dir
|
|
|
|
emptyDir: {}
|
|
|
|
containers:
|
|
|
|
- name: metrics-server
|
2021-07-03 09:03:50 +00:00
|
|
|
image: %{SYSTEM_DEFAULT_REGISTRY}%rancher/mirrored-metrics-server:v0.5.0
|
|
|
|
args: ['--cert-dir', '/tmp']
|
2019-11-05 21:30:50 +00:00
|
|
|
volumeMounts:
|
|
|
|
- name: tmp-dir
|
|
|
|
mountPath: /tmp
|
|
|
|
|