简体   繁体   中英

no pods monitor information in kubernetes(heapster, influxdb, grafana)

我创建heapster,influxdb,grafana监测kubernetes,通过kubectl从创建-f ./cluster/addons/cluster-monitoring/influxdb文件: https://github.com/kubernetes/kubernetes/tree/master/cluster/addons/ cluster-monitoring / influxdb我可以访问grafana,kube状态和influxdb(后者通过将:http附加到url),但是我无法访问heapster(获取404),并且grafana可以列出节点监视器信息,并且没有Pod监视信息,为什么?

Try exposing the heapster using NodePort. In heapster.yaml unders spec(service) add a new entry

 type: NodePort 

The yaml portion should look somethting like this after entry.

 spec: type: NodePort ports: - port: 80 targetPort: 8082 selector: k8s-app: heapster 

Then check the services running in your cluster using the following command.

 kubectl get services -n kube-system 

Find out the port of heapster from service list. It should look something like this.

80:32068/TCP

Then access heapster api with cluster_ip:port
For example:

 http://192.168.99.100:32068/api/v1/model/namespaces/default/pods/ 

You should be able to access the heapster then.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM