Repository containing files for the presentation of the project
Note
This part of the setup, not necessary to use NodeFitter but useful to replicate what demonstrated during the project presentation, uses Helm to install some components. To install Helm, run the following commands:
curl -fsSL -o get_helm.sh https://raw.githubusercontent.com/helm/helm/master/scripts/get-helm-4
chmod +x get_helm.sh
./get_helm.shImportant
If the various Helm commands are run where the Kubernetes control plane is, installation may fail due to the control plane being tainted. It is possible to un-taint the node by running
kubectl taint nodes <control-plane-node-name> node-role.kubernetes.io/control-plane:NoSchedule-Note
Contrary to the installation of kubernetes with minikube, the standard installation of kubeadm does not include any dynamic provisioner for PersistentVolumes, therefore, PersistentVolumes should be manually configured or it is possible to install a local dynamic provisioner like rancher local-path-provisioner.
To install the mentioned provisioner via Helm, run:
kubectl apply -f https://raw.githubusercontent.com/rancher/local-path-provisioner/master/deploy/local-path-storage.yamlThe Helm values under the helmCharts consider the mentioned provider as already installed, as well as the PersistentVolumeClaim of Grafana, see the monitoring.yml file
- Add the Prometheus Community Kubernetes Helm Charts with:
helm repo add prometheus-community https://prometheus-community.github.io/helm-charts helm repo update
- Install the
kube-prometheus-stackwithout unnecessary component and set the namespace tomonitoringhelm install prometheus prometheus-community/kube-prometheus-stack --namespace monitoring --create-namespace -f ./helmCharts/prometheusChart.yaml
- Install the
prometheus-adapter, necessary to make possible the retrieval of measurements by kubernetes:helm install prometheus-adapter prometheus-community/prometheus-adapter --namespace monitoring -f ./helmCharts/prometheusAdapterChart.yaml
-
Add the Grafana Community Helm Charts:
helm repo add grafana-community https://grafana-community.github.io/helm-charts helm repo update
-
Install
lokito centralize logs:helm install loki grafana-community/loki -f ./helmCharts/lokiChart.yaml -n monitoring
-
Add the Fluent Helm Charts with:
helm repo add fluent https://fluent.github.io/helm-charts helm repo update
-
Install
fluent-bit(daemonset) to collect logs from the various nodes:helm upgrade --install fluent-bit fluent/fluent-bit -n monitoring -f ./helmCharts/fluentBitChart.yaml
Once logged into Grafana (default username is admin, default password is admin), go to the Connections section in the side menu, then select Data sources. Add:
loki: leave all default, inserthttp://loki.monitoring:3100asConnectionaddressprometheus: leave all default, inserthttp://prometheus-kube-prometheus-prometheus.monitoring:9090asConnectionaddress
A copy of the connection infrormation can be found in the grafana folder of this repository.
Once logged into Grafana (default username is admin, default password is admin), go to the Dashboards section in the side menu and import the dashboard available in the grafana folder of this repository.