From 2fc804dd6c2fa94dc02f8e286ab8af33e7e04716 Mon Sep 17 00:00:00 2001 From: Staffan Olsson Date: Sat, 18 Aug 2018 20:24:32 +0200 Subject: [PATCH] https://github.com/Yolean/kubernetes-kafka/pull/120 --- heapster/heapster-rbac.yaml | 12 ++++++++++ heapster/heapster.yaml | 46 +++++++++++++++++++++++++++++++++++++ 2 files changed, 58 insertions(+) create mode 100644 heapster/heapster-rbac.yaml create mode 100644 heapster/heapster.yaml diff --git a/heapster/heapster-rbac.yaml b/heapster/heapster-rbac.yaml new file mode 100644 index 0000000..6e63803 --- /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 diff --git a/heapster/heapster.yaml b/heapster/heapster.yaml new file mode 100644 index 0000000..184ebf9 --- /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.5.0 + imagePullPolicy: IfNotPresent + command: + - /heapster + - --source=kubernetes:https://kubernetes.default + - --sink=kafka:?brokers=bootstrap.kafka:9092 +--- +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