Enter the Influxdb-grafana directory
First, ensure that you have successfully created Kube-system this namespace if not created namespace then use \kube-system.yaml file to create Kubectl create-f KUBE-SYSTEM.YAML Create Influxdb,grafana, execute Kubectl create-f./ Create a successful view: now create Heapster: There are two ways to create One is created in pod mode (not currently implemented Add-host function) into the Heapster directory Kubectl create-f./The pod to be heapster after the boot succeeds, the SSH corresponding cluster host performs Docker Exec-ti container ID/ After bin/sh enters the container, Vi/etc/hosts adds the following: (modified to the corresponding cluster IP address and host name) 172.16.71.171 centos-master172.16.71.172 centos-minion172172.16.71.173 centos-minion173172.16.71.175 centos-minion175 execute exit to exit the container, you can use Docker Logs the container ID to see if the Heapster container is successfully linked INFLUXDB here should be aware of the cluster IP and the last INFLUXDB request address, which is the address in the red box in the lower right corner. After performing the effect, the red box content is created for the K8S database success. Check the logs of the influxdb to see if the data continues to be written to Influxdb: The first figure shows that Influxdb is created in the node175 machine, landing 175 hosts view: Then, We can access the Grafana through the browser to view the monitoring information of the cluster: Execute iptables-t nat-l-n View Port: Direct access to the address within the red box in the browser: (Monitoring the graphical interface, you need to wait more than 5 minutes to show it.) can also go directly into the influxdb to view: Enter the INFLUXDB HTTP forwarding address in the browser: on the login page: Host: That is, the node address of the Influxdb pod port: That is, the INFLUXDB API's forwarding port user name and password are root, then click Save: After successful landing, click on the upper right corner, switch database: and then execute show SERies Viewing monitoring data:
K8s cluster Monitoring deployment