Skip to content

Latest commit

 

History

36 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Deployment

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.sh

Important

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.yaml

The Helm values under the helmCharts consider the mentioned provider as already installed, as well as the PersistentVolumeClaim of Grafana, see the monitoring.yml file

Setup custom metrics for HPA

  • 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-stack without unnecessary component and set the namespace to monitoring
    helm 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 

Setup logs collection

  • Add the Grafana Community Helm Charts:

    helm repo add grafana-community https://grafana-community.github.io/helm-charts
    helm repo update
  • Install loki to 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

Setup Grafana

Connection setup

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, insert http://loki.monitoring:3100 as Connection address
  • prometheus: leave all default, insert http://prometheus-kube-prometheus-prometheus.monitoring:9090 as Connection address

A copy of the connection infrormation can be found in the grafana folder of this repository.

Dashboard setup

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.

About

NodeFitter project resentation resources

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages