---
title: "DigitalOcean Kubernetes Monitoring made easy using Robusta"
publishDate: 2022-02-02
image: "https://community-cdn-digitalocean-com.global.ssl.fastly.net/ewkCPRKe438oQ8UCKjiMBRkL"
description: "Setting up Robusta monitoring stack on DigitalOcean Kubernetes."
product: "Kubernetes"
author: Abhimanyu Selvan
noIndex: true
isTutorial: true
---
## Introduction
Kubernetes solved many challenges with distributed environments, such as speed, scalability, and resilience. However, the flexibility and scalability that Kubernetes brings in deploying containerized applications also presents new challenges. Since there is no longer a 1-to-1 correlation between an application and the server it runs on, keeping track of the *health* of applications — abstracted by containers and once again by Kubernetes — can be daunting without the proper tools.
At DigitalOcean, we pride ourselves on offering straightforward and easy to use solutions. We have taken a similar approach to [DigitalOcean Kubernetes](https://try.digitalocean.com/kubernetes-in-minutes/?utm_campaign=emea_kubernetes_kw_en_cpc&utm_adgroup=kubernetes&_keyword=kubernetes&_device=c&_adposition=&utm_content=conversion&utm_medium=cpc&utm_source=google&gclid=CjwKCAiAuOieBhAIEiwAgjCvciwiXkrwAEkjzPhhsVLT534vTzuJtK7jr8Eb6jUGXrFzLCsFDoU3nBoCrEIQAvD_BwE) monitoring. Find below the different approaches to setting up the observability stack on DigitalOcean Kubernetes.
- [**DIY Observability stack**](https://github.com/digitalocean/Kubernetes-Starter-Kit-Developers/tree/main/04-setup-observability) which comprises of
- [Prometheus](https://github.com/digitalocean/Kubernetes-Starter-Kit-Developers/blob/main/04-setup-observability/prometheus-stack.md) for monitoring
- [Loki](https://github.com/digitalocean/Kubernetes-Starter-Kit-Developers/blob/main/04-setup-observability/loki-stack.md) to fetch and aggregate logs resources
- [Grafana](https://grafana.com/) dashboards
- [AlertManager](https://github.com/digitalocean/Kubernetes-Starter-Kit-Developers/blob/main/04-setup-observability/alerts-and-notifications.md) to alert and notify
- [**Robusta: All-in-one observability stack designed for Kubernetes**](https://home.robusta.dev/)
> Includes Prometheus, Grafana, AlertManager, and a solution for viewing logs, but it's been designed as an all-in-one package optimized for Kubernetes.
In this article, we will focus on *Robusta*.
## Robusta on DigitalOcean Kubernetes
[Robusta](https://github.com/robusta-dev/robusta) is an open-source Kubernetes monitoring, troubleshooting, and automation platform which comes pre-baked with
- Embedded [Prometheus stack](https://github.com/prometheus-community/helm-charts/tree/main/charts/kube-prometheus-stack) with [pre-configured alerts](https://home.robusta.dev/features/builtin-alerts)
- A [web ui](https://home.robusta.dev/features/cluster-timeline) to see all alerts, changes, and events in your cluster, including timeline and root cause analysis
- Alert enrichment and automatic remediation through a powerful [automation engine](https://home.robusta.dev/features/automation-engine)
- [Multi-cluster observability](https://home.robusta.dev/features/multi-cluster-observability)

### Target Audience
- Kubernetes novices and enterprises that want to monitor clusters without spending tons of time defining and tweaking alerts
- Organizations that already run DigitalOcean Kubernetes clusters with existing monitoring stacks. These users typically tend to have alerts in place and use Robusta to explore, remediate, and otherwise manage them
- Teams with multi-cluster or multi-tenant environments, either all on DigitalOcean, or spanning multiple clouds
### Prerequisites
- [doctl](https://docs.digitalocean.com/reference/doctl/)
- [python3](https://www.python.org/downloads/)
- [helm](https://helm.sh/docs/intro/install/)
- [kubectl](https://kubernetes.io/docs/tasks/tools/#kubectl)
### Robusta Architecture
#### Automation engine
The main component of Robusta is the automation engine, which runs in a cluster as Kubernetes deployments.
- **robusta-forwarder**: connects to the APIServer, monitors Kubernetes changes, and forwards them to robusta-runner.
- **robusta-runner**: executes [playbooks.](https://docs.robusta.dev/master/tutorials/configuring-automations.html#automation-basics)

[For more details »](https://docs.robusta.dev/master/)
### Installation
1. Install the `robusta-cli`:
This step is needed to generate the values file for helm chart installation.
```bash
# Requires python installed
python3 -m pip install -U robusta-cli --no-cache
```
2. Generate a `generated_values.yaml` for the Robusta chart:
```bash
# An interactive session where you can configure sinks
# such as receiving alerts to a particular Slack channel, MS Teams.
# This generates a `generated_values.yaml`
robusta gen-config
```
3. Update DigitalOcean cluster credentials using `doctl`:
```bash
# Notice: Adding cluster credentials to kubeconfig file found in "/Users/<username>/.kube/config"
# Notice: Setting current-context to <cluster-context>
doctl kubernetes cluster kubeconfig save <cluster-id>
```
4. Install Robusta with `helm`:
```bash
helm repo add robusta https://robusta-charts.storage.googleapis.com && helm repo update
helm install robusta robusta/robusta -f ./generated_values.yaml --set clusterName=<cluster-name>
```
[For more details on the installation »](https://docs.robusta.dev/master/installation.html)
### Post-Installation
#### Access Robusta Web UI
Upon successful installation, head to [https://platform.robusta.dev/](https://platform.robusta.dev/) and sign in with the email/account used during the installation process.
Here is an example view of the Robusta SaaS platform

#### Slack integration
Receive [slack](https://docs.robusta.dev/master/catalog/sinks/slack.html) alerts to your private slack channel.

#### Access Grafana Dashboards(optional)
Additionally, you can use [Grafana](https://grafana.com/oss/grafana/), which is part of the `kube-prom-stack` to visualize and query your data.
```bash
# Expose the robusta-grafana service
# log in with the credentials on localhost:3000
kubectl -n default port-forward svc/robusta-grafana 3000:80
# Open the browser and go to localhost:3000 to access Argo CD UI
# Login with username: `admin,` password: `prom-operator`
```

## Conclusion
By understanding what is happening and why, Kubernetes observability helps you better visualize, manage, and optimize the unpredictable, distributed nature of Kubernetes deployments. With seamless integration into the DigitalOcean Kubernetes clusters, Robusta provides a single pane of glass for your observability stack. Check out this [real-world example](https://github.com/digitalocean/mastodon-on-kubernetes) and get started with your observability journey.
## Useful Resources
- [Mastodon on DigitalOcean Kubernetes](https://github.com/digitalocean/mastodon-on-kubernetes) project uses Robusta for observability
- The [Kubernetes Bootstrapper](https://github.com/hivenetes/k8s-bootstrapper) project leverages Robusta
- [DigitalOcean Kubernetes: DIY Observability stack](https://github.com/digitalocean/Kubernetes-Starter-Kit-Developers/tree/main/04-setup-observability)