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-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 diff --git a/heapster/heapster.yaml b/heapster/heapster.yaml new file mode 100644 index 00000000..16181288 --- /dev/null +++ b/heapster/heapster.yaml @@ -0,0 +1,48 @@ +apiVersion: v1 +kind: ServiceAccount +metadata: + name: heapster + namespace: kube-system +--- +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: *labels + spec: + serviceAccountName: heapster + containers: + - name: heapster + image: k8s.gcr.io/heapster-amd64:v1.5.4@sha256:dccaabb0c20cf05c29baefa1e9bf0358b083ccc0fab492b9b3b47fb7e4db5472 + 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