Deepak Sood
May 5 · 3 min read

We have used helm for most of the deployments. Helms makes it easy to define, install and upgrade complex Kubernetes Application.

1. Installing Prometheus Operator and Grafana (Metrics Monitoring)

helm install \
--name prom \
--namespace monitoring \
stable/prometheus-operator
# pass -f values.yaml for custom configuration

You can change configurations in values.yml like storagesize and add additionalScrapeConfigs for monitoring other infrastructure if ServiceMonitor is not used.

This helm chart installs all default dashboards for your basic infrastructure and application monitoring.

cluster resources monitoring

2. Deploying EFK on Kubernetes (Centralised Logging)

# Add helm charts repository
helm repo add akomljen-charts https://raw.githubusercontent.com/komljen/helm-charts/master/charts/
# Install Elasticsearch Operator
helm install --name es-operator \
--namespace logging \
akomljen-charts/elasticsearch-operator
# Install EFK Stack for getting logs from containers and visualise in Kibana
helm install --name efk \
--namespace logging \
akomljen-charts/efk
# pass -f values.yaml for custom configuration
kubernetes cluster centralised logging

3. Deploying Kong API Gateway for managing all dashboards using Proxy with Authentication

Using Kong removes the need for using static IP address with LoadBalancer for each service and also gives a centralised authentication system for all services.

helm install --name kg --namespace kong stable/kong# pass -f values.yaml for custom configuration

4. Install Konga for configuring Kong using Admin Dashboard

kubectl apply -f konga-cluster.yaml
kong api gateway api dashboard
konga admin ui for registering services

Other Commands

  1. Updating services using helm
# updating prometheus-operator
helm upgrade \
--namespace monitoring \
prom \
stable/prometheus-operator
# updating efk
helm upgrade --namespace logging efk akomljen-charts/efk
# updating kong
helm upgrade --namespace kong kg stable/kong

2. Check status of helm releases

kubectl --namespace monitoring get pods -l "release=<release_name>"

3. Dashboards port-forward

# port-forward grafana dashboard
kubectl port-forward svc/prom-grafana 3000:80 -n monitoring
# port-forward prometheus dashboard
kubectl port-forward svc/prom-prometheus-operator-prometheus 9090:9090 -n monitoring
# port-forward kibana
kubectl port-forward svc/efk-kibana 5601:80 -n logging
# port-forward konga
kubectl port-forward svc/
konga-svc 1337:1337 -n kong

4. Clean-up

# delete prometheus
helm delete --purge prom
# delete efk
helm delete --purge efk
helm delete --purge es-operator
# delete kong
helm delete --purge kg
# remove konga
kubectl delete -f konga-cluster.yaml

Centralised monitoring and centralised logging at heart of Kubernetes Infrastructure

Deepak Sood

Coder / Researcher / Tech-Evangelist

Deepak Sood

Written by

Coder / Researcher / Tech-Evangelist

Deepak Sood

Coder / Researcher / Tech-Evangelist

Welcome to a place where words matter. On Medium, smart voices and original ideas take center stage - with no ads in sight. Watch
Follow all the topics you care about, and we’ll deliver the best stories for you to your homepage and inbox. Explore
Get unlimited access to the best stories on Medium — and support writers while you’re at it. Just $5/month. Upgrade