Movatterモバイル変換


[0]ホーム

URL:


Skip to content
DEV Community
Log in Create account

DEV Community

Rutam Prita Mishra
Rutam Prita Mishra

Posted on • Edited on

     

Getting Started with Robusta on Digital Ocean

Robusta Cover

Introduction

Robusta is an open-source platform for Kubernetes troubleshooting and automation. It makes it really easier to figure out pod crashes, send in alerts and describe a detailed analysis report on the breakdown.

Just like Docker is infrastructure-as-code for deploying applications, Robusta is infrastructure-as-code for maintaining K8s applications and handling their alerts.

If you're also wondering how to put this amazing tool into play and see it in complete action, then you have just landed on the right article. Today we will be setting up Robusta on our K8s cluster that is hosted using Digital Ocean.

Deploying a K8s cluster on Digital Ocean

Digital Ocean is a great cloud computing platform and it offers several cloud resource models with high scalability, availability, and the pay-as-you-go model for various customer use cases. Today we will be creating a Kubernetes cluster on Digital Ocean with the following steps.

Step 1: Sign in to Digital Ocean or create an account if you don't have an account yet. You can signup instantly and they provide 100$ credits for trial.

Do Signup

Step 2: Once you're logged in, you can findKubernetes listed in the left navigation pane. Click on that and wait till it navigates to the next dashboard.

DO Dashboard

Step 3: In the Kubernetes dashboard, simply click onCreate a Kubernetes Cluster to start with the configuration process.

Create K8s

Step 4: Now you need to fill up the configuration details for your cluster as per requirement. However, for a trial purpose, you can set up with the configuration given below.

  • Select a Kubernetes Version: Use the latest recommended one (1.21.9-do.0)
  • Choose a Datacentre Region: Use the one closest to your location (Asia-BLR for me)
  • VPC Network: Leave it at default
  • Choose Cluster Capacity:   
    • Node Pool Name: Set as per your choice or leave it at default   
    • Machine Type: Basic Nodes (We don't need Premium instances for a trial)
    • Node Plan: $20/month per Node (4GB Total/2 vCPUs)   
    • Node Count: 3
  • Finalize:    
    • Name: Leave at default   
    • Project: Leave at default   
    • Tags: Leave them empty as well

Now click onCreate Cluster and wait till it is provisioned (takes usually 4 mins).

Create Cluster

Step 5: Now it's time to set up a few things for our cluster before we dive into theRobusta installation on top of it.

Cluster Get Started

  • Getting Started-Click on Get started. On the next screen that appears, we need to choose a client that we want to use to interact with our cluster. Also, we need to set up an authentication certification method to authorize the client to connect to our clusters which lasts for 7 days.

K8s Connect

  • Connecting to Kubernetes-You can either set up an automated way of doing this or a manual way where you need to download thecluster config file every 7 days and run the below command putting the config file in your.kube folder in your system. We would proceed with the manual method for now.
cd ~/.kube && kubectl --kubeconfig="Name of your config file" get nodes
Enter fullscreen modeExit fullscreen mode

This should return you the list of nodes for your cluster.

Nodes

NOTE: If you want to set up the automated mode, then you need to install and configure thedoctl first. You can find the installation stepshere.

  • Patch & minor upgrades-You can opt for patches and minor version upgrades in this window. Simply selectAutomatically install minor version patches and specify a time window when the cluster should upgrade. Click onSave and Continue.

Patch Nodes

  • Install 1-click Apps-Here you can choose and install apps in your cluster directly from the marketplace. You can skip it for now.

Apps

  • Next Steps-Now we are done with our configuration. You can simply download the cluster config and store it safely and click onGreat, I'm done to complete the configuration process.

Done

Installing Robusta on our Cluster

As our cluster is provisioned and fully configured now, we will now start installing Robusta using their60 seconds Install procedure.

Step 1: We need to install theHelm chart and theRobusta-CLI first. We can do that by running the following command.

helm repo add robusta https://robusta-charts.storage.googleapis.com && helm repo updatepip install -U robusta-cli --no-cache
Enter fullscreen modeExit fullscreen mode

Robusta CLI

Step 2: Now we need to generate a config file for Robusta. While we fetch the config file, we can also enable the Robusta UI and slack/teams integration to receive alerts when something fails.

robusta gen-config
Enter fullscreen modeExit fullscreen mode

There will be a number of inputs required from your end to run this command successfully. You can follow the snippet below.

Robusta Config

You need to authorize the Slack integration and specify the workspace and the respective channel where you want to integrate and receive the alerts.

Add Slack

Once you have authorized, you will be redirected to the page below and then you can proceed in your terminal with the remaining ones.

Slack Setup

Once all the steps are completed successfully, agenerated_values.yaml file is generated that contains your Robusta account credentials. Store it safely for future use. You should also receive an alert in your workspace channel that Robusta has been added there.

Integration Alert

Step 3: Now we are gonna install Robusta using Helm. Thegenerated_values.yaml would act as thevalues.yaml for helm here.

helm install robusta robusta/robusta -f ./generated_values.yaml
Enter fullscreen modeExit fullscreen mode

This should install robusta successfully in your cluster.

Robusta Install

NOTE: If the above command errors out sayingUnable to connect to the server, then cross-check the config file in the.kube folder and make sure it has the same details as your downloaded cluster config file.

Step 4: Now run the command below to verify whether Robusta is deployed or not in the current namespace.

kubectl get pods
Enter fullscreen modeExit fullscreen mode

Robusta Runner

Testing alerts for a Crashing Pod

Now that we have successfully deployed Robusta, it's time to see it in action. We will now deploy a crashing pod and check whether we get alerts in slack after it fails twice. We will also go to the UI to fetch the other details.

Step 1: We will now create a crashing pod.

kubectl apply -f https://gist.githubusercontent.com/robusta-lab/283609047306dc1f05cf59806ade30b6/raw
Enter fullscreen modeExit fullscreen mode

Step 2: Now run the following to check whether thecrashpod is deployed and has reached 2 restarts or not that would trigger an alert in Slack.

kubectl get pods -A
Enter fullscreen modeExit fullscreen mode

CrashPod

Step 3: Open slack and check in the specified workspace's channel whether you have received an alert or not.

Alerts

Step 4: It's time to move to the UI now. Navigate tohttps://platform.robusta.dev/ and log in using the same Gmail that you mentioned while generating the Robusta config file.

UI Signin

Once you are logged in, you can see the dashboard with all the pods in all namespaces, and the ones with issues or errors are marked as well.

UI Dash

You can also click on each pod card and dive in for more information on the errors or issues with all the details and timestamps i.e., a complete analysis of the breakdown if any.

Dashboard Details

Well, we have reached the end of this extensive tutorial. Time to give a pat on your back for following along and successfully utilizing such an amazing toolRobusta. I hope all of you found this really helpful and it covered almost all minute details that you may come across. Feel free to like this article and drop in any comments or suggestions you may have.


NOTE: All the dashboard images used here are the respective properties ofDigital Ocean andRobusta. They are used here only for illustrative purposes.

Top comments(0)

Subscribe
pic
Create template

Templates let you quickly answer FAQs or store snippets for re-use.

Dismiss

Are you sure you want to hide this comment? It will become hidden in your post, but will still be visible via the comment'spermalink.

For further actions, you may consider blocking this person and/orreporting abuse

  • Joined

More fromRutam Prita Mishra

DEV Community

We're a place where coders share, stay up-to-date and grow their careers.

Log in Create account

[8]ページ先頭

©2009-2025 Movatter.jp