mirror of
https://github.com/k3s-io/k3s.git
synced 2024-06-07 19:41:36 +00:00
8258f0fa38
Signed-off-by: William Zhang <zhang.wanmin@zte.com.cn>
45 lines
1013 B
YAML
45 lines
1013 B
YAML
---
|
|
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:
|
|
serviceAccountName: metrics-server
|
|
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
|
|
command:
|
|
- /metrics-server
|
|
- --logtostderr
|
|
# - --v=2
|
|
# - --metric-resolution=10s
|
|
- --kubelet-insecure-tls
|
|
- --kubelet-preferred-address-types=InternalIP
|
|
image: k8s.gcr.io/metrics-server-amd64:v0.3.1
|
|
imagePullPolicy: Always
|
|
volumeMounts:
|
|
- name: tmp-dir
|
|
mountPath: /tmp
|
|
|