apiVersion:apps/v1 kind:Deployment metadata: name:monitoring-influxdb namespace:kube-system spec: replicas:1 selector: matchLabels: task:monitoring k8s-app:influxdb template: metadata: labels: task:monitoring k8s-app:influxdb spec: containers: - name:influxdb image:k8s.gcr.io/heapster-influxdb-amd64:v1.5.2 volumeMounts: - mountPath:/data name:influxdb-storage volumes: - name:influxdb-storage emptyDir:{} --- 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:monitoring-influxdb name:monitoring-influxdb namespace:kube-system spec: ports: - port:8086 targetPort:8086 selector: k8s-app:influxdb
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: task:monitoring k8s-app:heapster template: metadata: labels: task:monitoring k8s-app:heapster spec: serviceAccountName:heapster containers: - name:heapster image:k8s.gcr.io/heapster-amd64:v1.5.4 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 tpye:NodePort selector: k8s-app:heapster