From 6a524bdf741ad89a6904da38e0f976cbbe5976ac Mon Sep 17 00:00:00 2001 From: Staffan Olsson Date: Mon, 8 Jan 2018 21:40:56 +0100 Subject: [PATCH 1/6] Current https://github.com/kubernetes/heapster/tree/master/deploy/kube-config/influxdb --- heapster/heapster.yaml | 46 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 46 insertions(+) create mode 100644 heapster/heapster.yaml diff --git a/heapster/heapster.yaml b/heapster/heapster.yaml new file mode 100644 index 00000000..7853e1b9 --- /dev/null +++ b/heapster/heapster.yaml @@ -0,0 +1,46 @@ +apiVersion: v1 +kind: ServiceAccount +metadata: + name: heapster + namespace: kube-system +--- +apiVersion: extensions/v1beta1 +kind: Deployment +metadata: + name: heapster + namespace: kube-system +spec: + replicas: 1 + template: + metadata: + labels: + task: monitoring + k8s-app: heapster + spec: + serviceAccountName: heapster + containers: + - name: heapster + image: k8s.gcr.io/heapster-amd64:v1.4.2 + imagePullPolicy: IfNotPresent + command: + - /heapster + - --source=kubernetes:https://kubernetes.default + - --sink=influxdb:http://monitoring-influxdb.kube-system.svc:8086 +--- +apiVersion: v1 +kind: Service +metadata: + labels: + task: monitoring + # For use as a Cluster add-on (https://github.com/kubernetes/kubernetes/tree/master/cluster/addons) + # If you are NOT using this as an addon, you should comment out this line. + kubernetes.io/cluster-service: 'true' + kubernetes.io/name: Heapster + name: heapster + namespace: kube-system +spec: + ports: + - port: 80 + targetPort: 8082 + selector: + k8s-app: heapster From 2d6685ffbd7ff744cc672e071acb34ad43866e02 Mon Sep 17 00:00:00 2001 From: Staffan Olsson Date: Mon, 8 Jan 2018 21:43:47 +0100 Subject: [PATCH 2/6] Uses latest Heapster release --- heapster/heapster.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/heapster/heapster.yaml b/heapster/heapster.yaml index 7853e1b9..baeb0bb1 100644 --- a/heapster/heapster.yaml +++ b/heapster/heapster.yaml @@ -20,7 +20,7 @@ spec: serviceAccountName: heapster containers: - name: heapster - image: k8s.gcr.io/heapster-amd64:v1.4.2 + image: k8s.gcr.io/heapster-amd64:v1.5.0 imagePullPolicy: IfNotPresent command: - /heapster From 0634bb186a86f95c29567c7a5219e48c7beac2a9 Mon Sep 17 00:00:00 2001 From: Staffan Olsson Date: Mon, 8 Jan 2018 21:48:22 +0100 Subject: [PATCH 3/6] Current https://github.com/kubernetes/heapster/tree/master/deploy/kube-config/rbac --- heapster/heapster-rbac.yaml | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 heapster/heapster-rbac.yaml diff --git a/heapster/heapster-rbac.yaml b/heapster/heapster-rbac.yaml new file mode 100644 index 00000000..6e638038 --- /dev/null +++ b/heapster/heapster-rbac.yaml @@ -0,0 +1,12 @@ +kind: ClusterRoleBinding +apiVersion: rbac.authorization.k8s.io/v1beta1 +metadata: + name: heapster +roleRef: + apiGroup: rbac.authorization.k8s.io + kind: ClusterRole + name: system:heapster +subjects: +- kind: ServiceAccount + name: heapster + namespace: kube-system From ca447951feb9f08eafc2f0864b87cb7eb84372f0 Mon Sep 17 00:00:00 2001 From: Staffan Olsson Date: Mon, 8 Jan 2018 21:49:32 +0100 Subject: [PATCH 4/6] https://github.com/kubernetes/heapster/blob/master/docs/sink-configuration.md#kafka --- heapster/heapster.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/heapster/heapster.yaml b/heapster/heapster.yaml index baeb0bb1..62dc0d9d 100644 --- a/heapster/heapster.yaml +++ b/heapster/heapster.yaml @@ -25,7 +25,7 @@ spec: command: - /heapster - --source=kubernetes:https://kubernetes.default - - --sink=influxdb:http://monitoring-influxdb.kube-system.svc:8086 + - --sink="kafka:?brokers=bootstrap.kafka:9092" --- apiVersion: v1 kind: Service From 1806e528e73832dfdee48607060b7bf5dbce51e7 Mon Sep 17 00:00:00 2001 From: Staffan Olsson Date: Mon, 8 Jan 2018 21:54:14 +0100 Subject: [PATCH 5/6] Docs gotcha --- heapster/heapster.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/heapster/heapster.yaml b/heapster/heapster.yaml index 62dc0d9d..184ebf96 100644 --- a/heapster/heapster.yaml +++ b/heapster/heapster.yaml @@ -25,7 +25,7 @@ spec: command: - /heapster - --source=kubernetes:https://kubernetes.default - - --sink="kafka:?brokers=bootstrap.kafka:9092" + - --sink=kafka:?brokers=bootstrap.kafka:9092 --- apiVersion: v1 kind: Service From 2208f544ba2b245087884c28b01fa695a76398f8 Mon Sep 17 00:00:00 2001 From: Staffan Olsson Date: Thu, 9 May 2019 04:09:49 +0200 Subject: [PATCH 6/6] Heapster is being phased out, but can still produce to heapster-metrics --- heapster/Kustomization | 3 +++ heapster/heapster.yaml | 12 +++++++----- 2 files changed, 10 insertions(+), 5 deletions(-) create mode 100644 heapster/Kustomization diff --git a/heapster/Kustomization b/heapster/Kustomization new file mode 100644 index 00000000..014f90e2 --- /dev/null +++ b/heapster/Kustomization @@ -0,0 +1,3 @@ +resources: +- heapster-rbac.yaml +- heapster.yaml diff --git a/heapster/heapster.yaml b/heapster/heapster.yaml index 184ebf96..16181288 100644 --- a/heapster/heapster.yaml +++ b/heapster/heapster.yaml @@ -4,23 +4,25 @@ metadata: name: heapster namespace: kube-system --- -apiVersion: extensions/v1beta1 +apiVersion: apps/v1 kind: Deployment metadata: name: heapster namespace: kube-system spec: replicas: 1 + selector: + matchLabels: &labels + task: monitoring + k8s-app: heapster template: metadata: - labels: - task: monitoring - k8s-app: heapster + labels: *labels spec: serviceAccountName: heapster containers: - name: heapster - image: k8s.gcr.io/heapster-amd64:v1.5.0 + image: k8s.gcr.io/heapster-amd64:v1.5.4@sha256:dccaabb0c20cf05c29baefa1e9bf0358b083ccc0fab492b9b3b47fb7e4db5472 imagePullPolicy: IfNotPresent command: - /heapster