Fix endpoint names

This commit is contained in:
Carlos de Paula 2019-11-14 12:25:16 -03:00
parent cdc33631f4
commit b4d6ff0466
2 changed files with 4 additions and 8 deletions

View File

@ -69,11 +69,9 @@ wget https://github.com/rancher/k3s/releases/download/`curl -s https://api.githu
sudo mv k3s /usr/local/bin
# Start K3s
sudo k3s server --docker &
sudo k3s server &
```
To generate the metrics with all metadata required by the dashboards, K3s needs to be started with Docker as the runtime.
Now to deploy the monitoring stack on your K3s cluster, there are three parameters to be configured on `vars.jsonnet`:
1. Set `k3s.enabled` to `true`.
@ -91,8 +89,6 @@ To list the created ingresses, run `k3s kubectl get ingress --all-namespaces`.
* Prometheus on [https://prometheus.[your_node_ip].nip.io](https://prometheus.[your_node_ip].nip.io)
* Alertmanager on [https://alertmanager.[your_node_ip].nip.io](https://alertmanager.[your_node_ip].nip.io)
There are some dashboards that shows no values due to some cadvisor metrics not having the complete metadata if K3s is started with default script or no `--docker` arg. Check the open issues for more information.
## Updating the ingress suffixes
To avoid rebuilding all manifests, there is a make target to update the Ingress URL suffix to a different suffix (using nip.io) to match your host IP. Run `make change_suffix IP="[IP-ADDRESS]"` to change the ingress route IP for Grafana, Prometheus and Alertmanager and reapply the manifests. If you have a K3s cluster, run `make change_suffix IP="[IP-ADDRESS] K3S=k3s`.

View File

@ -5,10 +5,10 @@ local utils = import 'utils.libsonnet';
{
prometheus+:: {
kubeControllerManagerPrometheusDiscoveryEndpoints:
utils.newEndpoint('kube-controller-manager', 'kube-system', vars.k3s.master_ip, 'http-metrics', 10252),
utils.newEndpoint('kube-controller-manager-prometheus-discovery', 'kube-system', vars.k3s.master_ip, 'http-metrics', 10252),
kubeSchedulerPrometheusDiscoveryEndpoints:
utils.newEndpoint('kube-scheduler', 'kube-system', vars.k3s.master_ip, 'http-metrics', 10251),
utils.newEndpoint('kube-scheduler-prometheus-discovery', 'kube-system', vars.k3s.master_ip, 'http-metrics', 10251),
serviceMonitorKubelet+:
{