From 10e630a802827328b6ac98847ab4239d4e738a2c Mon Sep 17 00:00:00 2001 From: aabed Date: Thu, 10 Nov 2016 13:29:33 +0200 Subject: [PATCH 1/2] Adds kube-stat-metrics --- kube-state-metrics.yaml | 42 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 42 insertions(+) create mode 100644 kube-state-metrics.yaml diff --git a/kube-state-metrics.yaml b/kube-state-metrics.yaml new file mode 100644 index 0000000..41af5f3 --- /dev/null +++ b/kube-state-metrics.yaml @@ -0,0 +1,42 @@ +apiVersion: extensions/v1beta1 +kind: Deployment +metadata: + name: kube-state-metrics +spec: + replicas: 1 + template: + metadata: + labels: + app: kube-state-metrics + spec: + containers: + - name: kube-state-metrics + image: gcr.io/google_containers/kube-state-metrics:v0.3.0 + ports: + - name: metrics + containerPort: 8080 + resources: + requests: + memory: 30Mi + cpu: 100m + limits: + memory: 50Mi + cpu: 200m +--- +apiVersion: v1 +kind: Service +metadata: + annotations: + prometheus.io/scrape: 'true' + labels: + app: kube-state-metrics + name: kube-state-metrics +spec: + ports: + - name: metrics + port: 8080 + targetPort: metrics + protocol: TCP + selector: + app: kube-state-metrics + From 36fed976b3b33440a0086d46ea2fa30fe95197ab Mon Sep 17 00:00:00 2001 From: aabed Date: Thu, 10 Nov 2016 13:39:22 +0200 Subject: [PATCH 2/2] Splitting kube-metrics into two files --- ....yaml => kube-state-metrics-deployment.yaml | 18 ------------------ kube-state-metrics-svc.yaml | 16 ++++++++++++++++ 2 files changed, 16 insertions(+), 18 deletions(-) rename kube-state-metrics.yaml => kube-state-metrics-deployment.yaml (64%) create mode 100644 kube-state-metrics-svc.yaml diff --git a/kube-state-metrics.yaml b/kube-state-metrics-deployment.yaml similarity index 64% rename from kube-state-metrics.yaml rename to kube-state-metrics-deployment.yaml index 41af5f3..e2e7ee3 100644 --- a/kube-state-metrics.yaml +++ b/kube-state-metrics-deployment.yaml @@ -22,21 +22,3 @@ spec: limits: memory: 50Mi cpu: 200m ---- -apiVersion: v1 -kind: Service -metadata: - annotations: - prometheus.io/scrape: 'true' - labels: - app: kube-state-metrics - name: kube-state-metrics -spec: - ports: - - name: metrics - port: 8080 - targetPort: metrics - protocol: TCP - selector: - app: kube-state-metrics - diff --git a/kube-state-metrics-svc.yaml b/kube-state-metrics-svc.yaml new file mode 100644 index 0000000..22d3ce0 --- /dev/null +++ b/kube-state-metrics-svc.yaml @@ -0,0 +1,16 @@ +apiVersion: v1 +kind: Service +metadata: + annotations: + prometheus.io/scrape: 'true' + labels: + app: kube-state-metrics + name: kube-state-metrics +spec: + ports: + - name: metrics + port: 8080 + targetPort: metrics + protocol: TCP + selector: + app: kube-state-metrics