Invalid Kuberenets Web UI (Dashboard) Graphs
1 answer
For me the usage graphs worked after installing heapster as an addon. The metrics store for Heapster requires infuddb. Luckily, you can easily deploy the whole thing in k8s with the following namespace definitions kube-system
(tested it with k8s 1.4.6 ):
heapster-service.yml:
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
heapster-deployment.yml:
apiVersion: extensions/v1beta1
kind: Deployment
metadata:
name: heapster
namespace: kube-system
spec:
replicas: 1
template:
metadata:
labels:
task: monitoring
k8s-app: heapster
version: v6
spec:
containers:
- name: heapster
image: kubernetes/heapster:canary
imagePullPolicy: Always
command:
- /heapster
- --source=kubernetes:https://kubernetes.default
- --sink=influxdb:http://monitoring-influxdb:8086
influxdb-service.yml:
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:
# type: NodePort
ports:
- name: api
port: 8086
targetPort: 8086
selector:
k8s-app: influxdb
infuxdb-deployment.yml:
apiVersion: extensions/v1beta1
kind: Deployment
metadata:
name: monitoring-influxdb
namespace: kube-system
spec:
replicas: 1
template:
metadata:
labels:
task: monitoring
k8s-app: influxdb
spec:
volumes:
- name: influxdb-storage
emptyDir: {}
containers:
- name: influxdb
image: kubernetes/heapster_influxdb:v0.6
resources:
requests:
memory: "256M"
cpu: "0.1"
limits:
memory: "1G"
cpu: "1.0"
volumeMounts:
- mountPath: /data
name: influxdb-storage
+1
source to share