Warning: Virtual machines need to have at least 2 cores for InfluxDB to perform optimally.
Bring up a Kubernetes cluster, if you haven't already. Ensure that kubecfg.sh
is exported.
$ kubectl.sh create -f deploy/kube-config/influxdb/
Grafana service by default requests for a LoadBalancer. If that is not available in your cluster, consider changing that to NodePort. Use the external IP assigned to the Grafana service, to access Grafana. The default user name and password is 'admin'. Once you login to Grafana, add a datasource that is InfluxDB. The URL for InfluxDB will be http://:8086. Database name is 'k8s'. Default user name and password is 'root'.
Take a look at the storage schema to understand how metrics are stored in InfluxDB.
-
If the Grafana service is not accessible, chances are it might not be running. Use
kubectl.sh
to verify that theheapster
andinfluxdb & grafana
pods are alive.
$ kubectl.sh get pods ```
```shell
$ kubectl.sh get services ```
-
If the default Grafana dashboard doesn't show any graphs, check the Heapster logs with
kubectl.sh log <heapster pod name>
. Look for any errors related to accessing the Kubernetes master or the kubelet. -
To access the InfluxDB UI, you will have to make the InfluxDB service externally visible, similar to how Grafana is made publicly accessible.
-
If you find InfluxDB to be using up a lot of CPU or memory, consider placing resource restrictions on the
InfluxDB & Grafana
pod. You can addcpu: <millicores>
andmemory: <bytes>
in the Controller Spec and relaunch the controllers:
$ deploy/kube.sh restart ```