2018-01-09 18:57:14 +00:00
|
|
|
apiVersion: v1
|
|
|
|
kind: ServiceAccount
|
|
|
|
metadata:
|
|
|
|
name: metrics-server
|
|
|
|
namespace: kube-system
|
|
|
|
labels:
|
|
|
|
kubernetes.io/cluster-service: "true"
|
|
|
|
addonmanager.kubernetes.io/mode: Reconcile
|
|
|
|
---
|
|
|
|
apiVersion: v1
|
|
|
|
kind: ConfigMap
|
|
|
|
metadata:
|
|
|
|
name: metrics-server-config
|
|
|
|
namespace: kube-system
|
|
|
|
labels:
|
|
|
|
kubernetes.io/cluster-service: "true"
|
|
|
|
addonmanager.kubernetes.io/mode: EnsureExists
|
|
|
|
data:
|
|
|
|
NannyConfiguration: |-
|
|
|
|
apiVersion: nannyconfig/v1alpha1
|
|
|
|
kind: NannyConfiguration
|
|
|
|
---
|
|
|
|
apiVersion: extensions/v1beta1
|
|
|
|
kind: Deployment
|
|
|
|
metadata:
|
2018-11-26 18:23:56 +00:00
|
|
|
name: metrics-server-v0.3.1
|
2018-01-09 18:57:14 +00:00
|
|
|
namespace: kube-system
|
|
|
|
labels:
|
|
|
|
k8s-app: metrics-server
|
|
|
|
kubernetes.io/cluster-service: "true"
|
|
|
|
addonmanager.kubernetes.io/mode: Reconcile
|
2018-11-26 18:23:56 +00:00
|
|
|
version: v0.3.1
|
2018-01-09 18:57:14 +00:00
|
|
|
spec:
|
|
|
|
selector:
|
|
|
|
matchLabels:
|
|
|
|
k8s-app: metrics-server
|
2018-11-26 18:23:56 +00:00
|
|
|
version: v0.3.1
|
2018-01-09 18:57:14 +00:00
|
|
|
template:
|
|
|
|
metadata:
|
|
|
|
name: metrics-server
|
|
|
|
labels:
|
|
|
|
k8s-app: metrics-server
|
2018-11-26 18:23:56 +00:00
|
|
|
version: v0.3.1
|
2018-01-09 18:57:14 +00:00
|
|
|
annotations:
|
|
|
|
scheduler.alpha.kubernetes.io/critical-pod: ''
|
2018-07-18 14:47:22 +00:00
|
|
|
seccomp.security.alpha.kubernetes.io/pod: 'docker/default'
|
2018-01-09 18:57:14 +00:00
|
|
|
spec:
|
2018-03-06 22:33:18 +00:00
|
|
|
priorityClassName: system-cluster-critical
|
2018-01-09 18:57:14 +00:00
|
|
|
serviceAccountName: metrics-server
|
|
|
|
containers:
|
|
|
|
- name: metrics-server
|
2018-11-26 18:23:56 +00:00
|
|
|
image: k8s.gcr.io/metrics-server-amd64:v0.3.1
|
2018-01-09 18:57:14 +00:00
|
|
|
command:
|
|
|
|
- /metrics-server
|
2018-11-26 18:23:56 +00:00
|
|
|
- --metric-resolution=30s
|
|
|
|
# These are needed for GKE, which doesn't support secure communication yet.
|
|
|
|
# Remove these lines for non-GKE clusters, and when GKE supports token-based auth.
|
|
|
|
- --kubelet-port=10255
|
|
|
|
- --deprecated-kubelet-completely-insecure=true
|
2018-01-09 18:57:14 +00:00
|
|
|
ports:
|
|
|
|
- containerPort: 443
|
|
|
|
name: https
|
|
|
|
protocol: TCP
|
|
|
|
- name: metrics-server-nanny
|
2018-11-26 18:23:56 +00:00
|
|
|
image: k8s.gcr.io/addon-resizer:1.8.4
|
2018-01-09 18:57:14 +00:00
|
|
|
resources:
|
|
|
|
limits:
|
|
|
|
cpu: 100m
|
|
|
|
memory: 300Mi
|
|
|
|
requests:
|
|
|
|
cpu: 5m
|
|
|
|
memory: 50Mi
|
|
|
|
env:
|
|
|
|
- name: MY_POD_NAME
|
|
|
|
valueFrom:
|
|
|
|
fieldRef:
|
|
|
|
fieldPath: metadata.name
|
|
|
|
- name: MY_POD_NAMESPACE
|
|
|
|
valueFrom:
|
|
|
|
fieldRef:
|
|
|
|
fieldPath: metadata.namespace
|
|
|
|
volumeMounts:
|
|
|
|
- name: metrics-server-config-volume
|
|
|
|
mountPath: /etc/config
|
|
|
|
command:
|
|
|
|
- /pod_nanny
|
|
|
|
- --config-dir=/etc/config
|
2018-11-26 18:23:56 +00:00
|
|
|
- --cpu={{ base_metrics_server_cpu }}
|
2018-01-09 18:57:14 +00:00
|
|
|
- --extra-cpu=0.5m
|
2018-11-26 18:23:56 +00:00
|
|
|
- --memory={{ base_metrics_server_memory }}
|
|
|
|
- --extra-memory={{ metrics_server_memory_per_node }}Mi
|
2018-01-09 18:57:14 +00:00
|
|
|
- --threshold=5
|
2018-11-26 18:23:56 +00:00
|
|
|
- --deployment=metrics-server-v0.3.1
|
2018-01-09 18:57:14 +00:00
|
|
|
- --container=metrics-server
|
|
|
|
- --poll-period=300000
|
|
|
|
- --estimator=exponential
|
2018-11-26 18:23:56 +00:00
|
|
|
# Specifies the smallest cluster (defined in number of nodes)
|
|
|
|
# resources will be scaled to.
|
|
|
|
- --minClusterSize={{ metrics_server_min_cluster_size }}
|
2018-01-09 18:57:14 +00:00
|
|
|
volumes:
|
|
|
|
- name: metrics-server-config-volume
|
|
|
|
configMap:
|
|
|
|
name: metrics-server-config
|
|
|
|
tolerations:
|
|
|
|
- key: "CriticalAddonsOnly"
|
|
|
|
operator: "Exists"
|