0
votes

I create heapster, influxdb, grafana to monitor kubernetes , by kubectl create -f ./cluster/addons/cluster-monitoring/influxdb file from : https://github.com/kubernetes/kubernetes/tree/master/cluster/addons/cluster-monitoring/influxdb I can access grafana, kube status and influxdb (the latter by appending :http to the url ) ,but I cannot access the heapster (get a 404 ), and the grafana can list node monitor information, and no pods monitor information,why?

1
You can retrieve the logs per pod with kubectl logs {pod} {namespace} That could give you a few pointersNorbert van Nobelen
How did you install? Which command you used to install ? #kubectl ....?user2486495

1 Answers

0
votes

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.