2017-08-30 14:30:41 +00:00
|
|
|
apiVersion: v1
|
|
|
|
kind: ServiceAccount
|
|
|
|
metadata:
|
|
|
|
name: metrics-server
|
|
|
|
namespace: kube-system
|
2017-09-01 11:47:00 +00:00
|
|
|
labels:
|
|
|
|
kubernetes.io/cluster-service: "true"
|
|
|
|
addonmanager.kubernetes.io/mode: Reconcile
|
2017-08-30 14:30:41 +00:00
|
|
|
---
|
2017-11-21 15:57:39 +00:00
|
|
|
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
|
|
|
|
---
|
2017-08-30 14:30:41 +00:00
|
|
|
apiVersion: extensions/v1beta1
|
|
|
|
kind: Deployment
|
|
|
|
metadata:
|
2017-12-20 13:44:39 +00:00
|
|
|
name: metrics-server-v0.2.1
|
2017-08-30 14:30:41 +00:00
|
|
|
namespace: kube-system
|
|
|
|
labels:
|
|
|
|
k8s-app: metrics-server
|
2017-09-01 11:47:00 +00:00
|
|
|
kubernetes.io/cluster-service: "true"
|
|
|
|
addonmanager.kubernetes.io/mode: Reconcile
|
2017-12-20 13:44:39 +00:00
|
|
|
version: v0.2.1
|
2017-08-30 14:30:41 +00:00
|
|
|
spec:
|
|
|
|
selector:
|
|
|
|
matchLabels:
|
|
|
|
k8s-app: metrics-server
|
2017-12-20 13:44:39 +00:00
|
|
|
version: v0.2.1
|
2017-08-30 14:30:41 +00:00
|
|
|
template:
|
|
|
|
metadata:
|
|
|
|
name: metrics-server
|
|
|
|
labels:
|
|
|
|
k8s-app: metrics-server
|
2017-12-20 13:44:39 +00:00
|
|
|
version: v0.2.1
|
2017-09-01 11:47:00 +00:00
|
|
|
annotations:
|
|
|
|
scheduler.alpha.kubernetes.io/critical-pod: ''
|
2018-05-03 05:50:29 +00:00
|
|
|
seccomp.security.alpha.kubernetes.io/pod: 'docker/default'
|
2017-08-30 14:30:41 +00:00
|
|
|
spec:
|
2018-02-02 03:26:41 +00:00
|
|
|
priorityClassName: system-cluster-critical
|
2017-08-30 14:30:41 +00:00
|
|
|
serviceAccountName: metrics-server
|
|
|
|
containers:
|
|
|
|
- name: metrics-server
|
Switch to k8s.gcr.io vanity domain
This is the 2nd attempt. The previous was reverted while we figured out
the regional mirrors (oops).
New plan: k8s.gcr.io is a read-only facade that auto-detects your source
region (us, eu, or asia for now) and pulls from the closest. To publish
an image, push k8s-staging.gcr.io and it will be synced to the regionals
automatically (similar to today). For now the staging is an alias to
gcr.io/google_containers (the legacy URL).
When we move off of google-owned projects (working on it), then we just
do a one-time sync, and change the google-internal config, and nobody
outside should notice.
We can, in parallel, change the auto-sync into a manual sync - send a PR
to "promote" something from staging, and a bot activates it. Nice and
visible, easy to keep track of.
2018-01-17 19:36:53 +00:00
|
|
|
image: k8s.gcr.io/metrics-server-amd64:v0.2.1
|
2017-08-30 14:30:41 +00:00
|
|
|
command:
|
|
|
|
- /metrics-server
|
|
|
|
- --source=kubernetes.summary_api:''
|
|
|
|
ports:
|
|
|
|
- containerPort: 443
|
|
|
|
name: https
|
|
|
|
protocol: TCP
|
2017-10-06 12:40:55 +00:00
|
|
|
- name: metrics-server-nanny
|
2018-07-13 20:02:55 +00:00
|
|
|
image: k8s.gcr.io/addon-resizer:1.8.3
|
2017-10-06 12:40:55 +00:00
|
|
|
resources:
|
|
|
|
limits:
|
|
|
|
cpu: 100m
|
|
|
|
memory: 300Mi
|
|
|
|
requests:
|
2017-12-15 14:34:17 +00:00
|
|
|
cpu: 5m
|
|
|
|
memory: 50Mi
|
2017-10-06 12:40:55 +00:00
|
|
|
env:
|
|
|
|
- name: MY_POD_NAME
|
|
|
|
valueFrom:
|
|
|
|
fieldRef:
|
|
|
|
fieldPath: metadata.name
|
|
|
|
- name: MY_POD_NAMESPACE
|
|
|
|
valueFrom:
|
|
|
|
fieldRef:
|
|
|
|
fieldPath: metadata.namespace
|
2017-11-21 15:57:39 +00:00
|
|
|
volumeMounts:
|
|
|
|
- name: metrics-server-config-volume
|
|
|
|
mountPath: /etc/config
|
2017-10-06 12:40:55 +00:00
|
|
|
command:
|
|
|
|
- /pod_nanny
|
2017-11-21 15:57:39 +00:00
|
|
|
- --config-dir=/etc/config
|
2018-07-13 20:02:55 +00:00
|
|
|
- --cpu={{ base_metrics_server_cpu }}
|
2017-10-06 12:40:55 +00:00
|
|
|
- --extra-cpu=0.5m
|
2018-07-13 20:02:55 +00:00
|
|
|
- --memory={{ base_metrics_server_memory }}
|
|
|
|
- --extra-memory={{ metrics_server_memory_per_node }}Mi
|
2017-10-06 12:40:55 +00:00
|
|
|
- --threshold=5
|
2017-12-20 13:44:39 +00:00
|
|
|
- --deployment=metrics-server-v0.2.1
|
2017-10-06 12:40:55 +00:00
|
|
|
- --container=metrics-server
|
|
|
|
- --poll-period=300000
|
|
|
|
- --estimator=exponential
|
2018-07-13 20:02:55 +00:00
|
|
|
- --minClusterSize={{ metrics_server_min_cluster_size }}
|
2017-11-21 15:57:39 +00:00
|
|
|
volumes:
|
|
|
|
- name: metrics-server-config-volume
|
|
|
|
configMap:
|
|
|
|
name: metrics-server-config
|
2017-08-30 14:30:41 +00:00
|
|
|
tolerations:
|
|
|
|
- key: "CriticalAddonsOnly"
|
|
|
|
operator: "Exists"
|