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:
|
2022-11-24 00:37:25 +00:00
|
|
|
revisionHistoryLimit: 0
|
|
|
|
strategy:
|
|
|
|
type: RollingUpdate
|
|
|
|
rollingUpdate:
|
|
|
|
maxUnavailable: 1
|
2019-11-05 21:30:50 +00:00
|
|
|
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
|
2024-03-07 08:17:20 +00:00
|
|
|
image: %{SYSTEM_DEFAULT_REGISTRY}%rancher/mirrored-metrics-server:v0.7.0
|
2022-01-05 03:02:52 +00:00
|
|
|
args:
|
|
|
|
- --cert-dir=/tmp
|
2022-09-16 22:34:06 +00:00
|
|
|
- --secure-port=10250
|
2022-10-31 08:05:04 +00:00
|
|
|
- --kubelet-preferred-address-types=%{PREFERRED_ADDRESS_TYPES}%
|
2022-01-05 03:02:52 +00:00
|
|
|
- --kubelet-use-node-status-port
|
|
|
|
- --metric-resolution=15s
|
2023-05-16 20:13:50 +00:00
|
|
|
- --tls-cipher-suites=TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384,TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384,TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256,TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256,TLS_ECDHE_ECDSA_WITH_CHACHA20_POLY1305,TLS_ECDHE_RSA_WITH_CHACHA20_POLY1305
|
2022-01-05 03:02:52 +00:00
|
|
|
resources:
|
|
|
|
requests:
|
|
|
|
cpu: 100m
|
|
|
|
memory: 70Mi
|
|
|
|
ports:
|
|
|
|
- name: https
|
2022-09-16 22:34:06 +00:00
|
|
|
containerPort: 10250
|
2022-01-05 03:02:52 +00:00
|
|
|
protocol: TCP
|
|
|
|
readinessProbe:
|
|
|
|
httpGet:
|
|
|
|
path: /readyz
|
|
|
|
port: https
|
|
|
|
scheme: HTTPS
|
|
|
|
initialDelaySeconds: 0
|
|
|
|
periodSeconds: 2
|
|
|
|
timeoutSeconds: 1
|
|
|
|
successThreshold: 1
|
|
|
|
failureThreshold: 3
|
|
|
|
livenessProbe:
|
|
|
|
httpGet:
|
|
|
|
path: /livez
|
|
|
|
port: https
|
|
|
|
scheme: HTTPS
|
|
|
|
initialDelaySeconds: 60
|
|
|
|
periodSeconds: 10
|
|
|
|
timeoutSeconds: 1
|
|
|
|
successThreshold: 1
|
|
|
|
failureThreshold: 3
|
|
|
|
securityContext:
|
|
|
|
readOnlyRootFilesystem: true
|
|
|
|
runAsNonRoot: true
|
|
|
|
runAsUser: 1000
|
|
|
|
allowPrivilegeEscalation: false
|
2019-11-05 21:30:50 +00:00
|
|
|
volumeMounts:
|
|
|
|
- name: tmp-dir
|
|
|
|
mountPath: /tmp
|