Kuberenets Web UI(仪表板)缺少图 [英] Kuberenets Web UI (Dashboard) missing graphs
问题描述
我已经用Kubeadm v1.6安装了Docker v1.13和Kubernetes.然后,我安装了Web UI(仪表板).我可以访问它,但是缺少它的CPU/内存使用情况图表...为什么会发生这种情况?
I have installed Docker v1.13 and Kubernetes with Kubeadm v1.6. Then I installed Web UI (Dashboard). I can access it but its missing CPU/Memory usage graphs... Why could this happen?
推荐答案
对我来说,使用图在我安装 heapster 作为插件. Heapster需要使用influxdb作为度量标准存储的数据接收器.幸运的是,您可以在kube-system
命名空间中使用以下定义轻松地将所有这些部署在k8s中(已通过k8s 1.4.6 ):
For me the usage graphs worked once I installed heapster as an addon. Heapster requires an influxdb as data sink for the metric storage. Luckily you can deploy all those easily in k8s with the following definitions in the kube-system
namespace (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
这篇关于Kuberenets Web UI(仪表板)缺少图的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!