You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
|
|
---
|
|
|
|
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:
|
|
|
|
priorityClassName: "system-node-critical"
|
|
|
|
serviceAccountName: metrics-server
|
|
|
|
tolerations:
|
|
|
|
- key: "CriticalAddonsOnly"
|
|
|
|
operator: "Exists"
|
|
|
|
- key: "node-role.kubernetes.io/control-plane"
|
|
|
|
operator: "Exists"
|
|
|
|
effect: "NoSchedule"
|
|
|
|
- key: "node-role.kubernetes.io/master"
|
|
|
|
operator: "Exists"
|
|
|
|
effect: "NoSchedule"
|
|
|
|
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
|
|
|
|
image: %{SYSTEM_DEFAULT_REGISTRY}%rancher/mirrored-metrics-server:v0.5.2
|
|
|
|
args:
|
|
|
|
- --cert-dir=/tmp
|
|
|
|
- --secure-port=4443
|
|
|
|
- --kubelet-preferred-address-types=InternalIP,ExternalIP,Hostname
|
|
|
|
- --kubelet-use-node-status-port
|
|
|
|
- --metric-resolution=15s
|
|
|
|
resources:
|
|
|
|
requests:
|
|
|
|
cpu: 100m
|
|
|
|
memory: 70Mi
|
|
|
|
ports:
|
|
|
|
- name: https
|
|
|
|
containerPort: 4443
|
|
|
|
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
|
|
|
|
volumeMounts:
|
|
|
|
- name: tmp-dir
|
|
|
|
mountPath: /tmp
|