<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Aashi Modi</title>
    <description>The latest articles on DEV Community by Aashi Modi (@aashimodi14).</description>
    <link>https://dev.to/aashimodi14</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F643212%2Fea678d1e-5ef7-4b20-aac8-06ac481d639a.jpg</url>
      <title>DEV Community: Aashi Modi</title>
      <link>https://dev.to/aashimodi14</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/aashimodi14"/>
    <language>en</language>
    <item>
      <title>Monitoring Velero Backup and Restore with BotKube</title>
      <dc:creator>Aashi Modi</dc:creator>
      <pubDate>Mon, 07 Jun 2021 12:11:20 +0000</pubDate>
      <link>https://dev.to/infracloud/monitoring-velero-backup-and-restore-with-botkube-2g4b</link>
      <guid>https://dev.to/infracloud/monitoring-velero-backup-and-restore-with-botkube-2g4b</guid>
      <description>&lt;p&gt;One of the key challenges for Kubernetes Day 2 operations is Observability i.e having a holistic view of your system’s health. This is where BotKube helps to improve your monitoring experience of your Kubernetes clusters by sending notifications to supported messaging platforms. BotKube helps you solve several interesting use cases, for example, monitoring Velero backup failure or certificate issue/expiry status by cert-manager, etc. Previously, we discussed how to integrate &lt;a href="https://www.infracloud.io/blogs/monitoring-kubernetes-cert-manager-certificates/"&gt;cert-manager monitoring using BotKube&lt;/a&gt;. In this blog, we will configure BotKube to monitor your Velero backups and restores.&lt;/p&gt;

&lt;h2&gt;
  
  
  What is BotKube?
&lt;/h2&gt;

&lt;blockquote&gt;
&lt;p&gt;BotKube is a messaging tool for monitoring and debugging Kubernetes clusters. BotKube can be integrated with multiple messaging platforms like - Slack, Mattermost, or Microsoft Teams to help you monitor your Kubernetes cluster(s), debug critical deployments, and gives recommendations for standard practices by running checks on the Kubernetes resources. - &lt;em&gt;&lt;a href="https://www.botkube.io/"&gt;BotKube website&lt;/a&gt;&lt;/em&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h2&gt;
  
  
  What is Velero?
&lt;/h2&gt;

&lt;blockquote&gt;
&lt;p&gt;Velero is an open source tool to safely backup and restore, perform disaster recovery, and migrate Kubernetes cluster resources. - &lt;em&gt;&lt;a href="https://velero.io/"&gt;Velero website&lt;/a&gt;&lt;/em&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;It supports snapshotting of your cluster's Persistent Volumes using your cloud provider's storage and restoring the Persistent Volumes from the snapshots.&lt;/p&gt;

&lt;p&gt;While considering backup solutions for disaster recovery, we want to ensure backups for etcd - to restore our Master node and Cluster configs; and Persistent Volume for application data. With the help of Velero, you can create volume snapshots, on-demand backups, scheduled backups, or restore backups.&lt;/p&gt;

&lt;h2&gt;
  
  
  How to monitor Velero backups using BotKube?
&lt;/h2&gt;

&lt;p&gt;With the release of BotKube v0.11.0+, monitoring of any Kubernetes resources, including custom resources, is supported. This allows us to configure alerts and notify of &lt;code&gt;create&lt;/code&gt;, &lt;code&gt;delete&lt;/code&gt;, &lt;code&gt;error&lt;/code&gt; events of Velero resources. BotKube can notify us about the events and updates in &lt;code&gt;status.Phase&lt;/code&gt; field in &lt;code&gt;velero.io/v1/backups&lt;/code&gt; and &lt;code&gt;velero.io/v1/restores&lt;/code&gt; resource.&lt;/p&gt;

&lt;h2&gt;
  
  
  Prerequisites
&lt;/h2&gt;

&lt;p&gt;This post assumes that you already have a Kubernetes cluster with Velero and BotKube running on it. If you don’t have these things running, follow this section to get a minimal setup running on top of minikube. We will be configuring BotKube with Slack for this tutorial. You can use &lt;a href="https://www.botkube.io/installation/"&gt;any other interface like Mattermost, MS Teams, Discord, etc.&lt;/a&gt; supported by BotKube as well.&lt;/p&gt;

&lt;h3&gt;
  
  
  How to create a Kubernetes cluster with Minikube?
&lt;/h3&gt;

&lt;ol&gt;
&lt;li&gt;Install minikube on your machine by following the instructions &lt;a href="https://minikube.sigs.k8s.io/docs/start/"&gt;given here&lt;/a&gt;.&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;To start the minikube cluster, run the following command.&lt;br&gt;
&lt;/p&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nv"&gt;$ &lt;/span&gt;minikube start 
😄  minikube v1.20.0 on Ubuntu 20.04
✨  Using the docker driver based on existing profile
👍  Starting control plane node minikube &lt;span class="k"&gt;in &lt;/span&gt;cluster minikube
🚜  Pulling base image ...
🔄  Restarting existing docker container &lt;span class="k"&gt;for&lt;/span&gt; &lt;span class="s2"&gt;"minikube"&lt;/span&gt; ...
🐳  Preparing Kubernetes v1.20.2 on Docker 20.10.6 ...
🔎  Verifying Kubernetes components...
    ▪ Using image gcr.io/k8s-minikube/storage-provisioner:v5
🌟  Enabled addons: storage-provisioner, default-storageclass
🏄  Done! kubectl is now configured to use &lt;span class="s2"&gt;"minikube"&lt;/span&gt; cluster and &lt;span class="s2"&gt;"default"&lt;/span&gt; namespace by default
&lt;/code&gt;&lt;/pre&gt;

&lt;/li&gt;
&lt;/ol&gt;

&lt;h3&gt;
  
  
  Install and setup BotKube
&lt;/h3&gt;

&lt;ol&gt;
&lt;li&gt;Install Helm on your machine by following the instructions &lt;a href="https://helm.sh/docs/intro/install/"&gt;given here&lt;/a&gt;.&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;To add the &lt;code&gt;infracloudio&lt;/code&gt; Helm chart repository, run the following command.&lt;br&gt;
&lt;/p&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nv"&gt;$ &lt;/span&gt;helm repo add infracloudio https://infracloudio.github.io/charts
&lt;span class="s2"&gt;"infracloudio"&lt;/span&gt; has been added to your repositories
&lt;span class="nv"&gt;$ &lt;/span&gt;helm repo update
...Successfully got an update from the &lt;span class="s2"&gt;"infracloudio"&lt;/span&gt; chart repository
Update Complete. ⎈Happy Helming!⎈
&lt;/code&gt;&lt;/pre&gt;

&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Install the BotKube Slack app in your workspace by following the instructions given in &lt;a href="https://www.botkube.io/installation/slack/#install-botkube-slack-app-to-your-slack-workspace"&gt;this section of the documentation&lt;/a&gt;. You will be provided a Slack bot access token, be sure to save it.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;To create the Helm values file for BotKube, run the following command.&lt;br&gt;
&lt;/p&gt;
&lt;pre class="highlight yaml"&gt;&lt;code&gt;&lt;span class="s"&gt;cat &amp;lt;&amp;lt;EOF &amp;gt; botkube-values.yaml&lt;/span&gt;
&lt;span class="na"&gt;communications&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
  &lt;span class="na"&gt;slack&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
    &lt;span class="na"&gt;enabled&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="no"&gt;true&lt;/span&gt;
    &lt;span class="na"&gt;channel&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"&lt;/span&gt;&lt;span class="s"&gt;test"&lt;/span&gt;
    &lt;span class="na"&gt;token&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"&lt;/span&gt;&lt;span class="s"&gt;&amp;lt;TOKEN_FROM_3&amp;gt;"&lt;/span&gt;

&lt;span class="na"&gt;config&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
  &lt;span class="na"&gt;settings&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
    &lt;span class="na"&gt;clustername&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"&lt;/span&gt;&lt;span class="s"&gt;minikube"&lt;/span&gt;
    &lt;span class="na"&gt;kubectl&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
      &lt;span class="na"&gt;enabled&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="no"&gt;true&lt;/span&gt;
&lt;span class="s"&gt;EOF&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;To create a namespace and install BotKube, run the following command.&lt;br&gt;
&lt;/p&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nv"&gt;$ &lt;/span&gt;helm &lt;span class="nb"&gt;install &lt;/span&gt;botkube infracloudio/botkube &lt;span class="se"&gt;\&lt;/span&gt;
    &lt;span class="nt"&gt;--namespace&lt;/span&gt; botkube &lt;span class="nt"&gt;--create-namespace&lt;/span&gt; &lt;span class="se"&gt;\&lt;/span&gt;
    &lt;span class="nt"&gt;-f&lt;/span&gt; botkube-values.yaml
&lt;/code&gt;&lt;/pre&gt;

&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Verify that the pods are running.&lt;br&gt;
&lt;/p&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nv"&gt;$ &lt;/span&gt;kubectl get pods &lt;span class="nt"&gt;-n&lt;/span&gt; botkube                              
NAME                       READY   STATUS    RESTARTS   AGE
botkube-84f95dd594-qrz28   1/1     Running   5          24h
&lt;/code&gt;&lt;/pre&gt;

&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;&lt;em&gt;If any of the above instructions don’t work, please refer to the &lt;a href="https://www.botkube.io/installation/slack/"&gt;Botkube's official documentation page&lt;/a&gt; for an updated version of these instructions.&lt;/em&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  How do you install Velero?
&lt;/h3&gt;

&lt;p&gt;Velero consists of:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;A command-line client that runs locally&lt;/li&gt;
&lt;li&gt;A server that runs on your cluster&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;To install the CLI client locally, download and extract the &lt;a href="https://github.com/vmware-tanzu/velero/releases/latest"&gt;latest release's&lt;/a&gt; tarball for your client platform. Move the extracted velero binary to somewhere in your &lt;code&gt;$PATH&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;Install Velero in your cluster:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;p&gt;To add &lt;code&gt;vmware-tanzu&lt;/code&gt; Helm repository, run the following command.&lt;br&gt;
&lt;/p&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nv"&gt;$ &lt;/span&gt;helm repo add vmware-tanzu https://vmware-tanzu.github.io/helm-charts
&lt;span class="nv"&gt;$ &lt;/span&gt;helm repo update
&lt;/code&gt;&lt;/pre&gt;

&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Configure provider credentials. Follow the Velero plugin setup instructions for your &lt;a href="https://velero.io/docs/v1.6/supported-providers/"&gt;cloud provider&lt;/a&gt;. For example, if you are using AWS (as this guide does), follow the &lt;a href="https://github.com/vmware-tanzu/velero-plugin-for-aws#setup"&gt;AWS plugin setup instructions&lt;/a&gt; to create an IAM user and S3 bucket and obtain a credentials file.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Install Velero.&lt;br&gt;
Add below in velero-values.yaml for configuring values.&lt;br&gt;
&lt;/p&gt;
&lt;pre class="highlight yaml"&gt;&lt;code&gt;&lt;span class="s"&gt;cat &amp;lt;&amp;lt;EOF &amp;gt; velero-values.yaml&lt;/span&gt;
&lt;span class="na"&gt;credentials&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
  &lt;span class="na"&gt;secretContents&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
    &lt;span class="na"&gt;cloud&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;credentials-velero&lt;/span&gt;
&lt;span class="na"&gt;configuration&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
  &lt;span class="na"&gt;provider&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;aws&lt;/span&gt;
  &lt;span class="na"&gt;backupStorageLocation&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;  
    &lt;span class="na"&gt;bucket&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;&amp;lt;bucket-name&amp;gt;&lt;/span&gt;
    &lt;span class="na"&gt;config&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
      &lt;span class="na"&gt;region&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;&amp;lt;region&amp;gt;&lt;/span&gt;
&lt;span class="s"&gt;EOF&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;


&lt;p&gt;Install the velero chart&lt;br&gt;
&lt;/p&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;helm &lt;span class="nb"&gt;install &lt;/span&gt;velero vmware-tanzu/velero &lt;span class="nt"&gt;--namespace&lt;/span&gt; velero &lt;span class="nt"&gt;-f&lt;/span&gt; velero-values.yaml
&lt;/code&gt;&lt;/pre&gt;

&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Verify that the pods are running.&lt;br&gt;
&lt;/p&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nv"&gt;$ &lt;/span&gt;kubectl get pods &lt;span class="nt"&gt;-n&lt;/span&gt; velero 
NAME                      READY   STATUS    RESTARTS   AGE
velero-65656995d6-59c6r   1/1     Running   2          44h
&lt;/code&gt;&lt;/pre&gt;

&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;&lt;em&gt;If any of the above instructions don’t work, please take a look at the &lt;a href="https://github.com/vmware-tanzu/helm-charts/blob/main/charts/velero/README.md"&gt;Velero's official documentation page&lt;/a&gt; for an updated version of these instructions.&lt;/em&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Let’s configure BotKube for monitoring
&lt;/h3&gt;

&lt;p&gt;We will now configure BotKube to monitor the &lt;code&gt;backups&lt;/code&gt; and &lt;code&gt;restores&lt;/code&gt; custom resources of Velero.&lt;/p&gt;

&lt;p&gt;Add the following snippet under &lt;code&gt;config&lt;/code&gt; in the &lt;code&gt;botkube-values.yaml&lt;/code&gt; file.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight yaml"&gt;&lt;code&gt;&lt;span class="c1"&gt;#config:&lt;/span&gt;
&lt;span class="c1"&gt;## Resources you want to watch&lt;/span&gt;
  &lt;span class="na"&gt;resources&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
    &lt;span class="pi"&gt;-&lt;/span&gt; &lt;span class="na"&gt;name&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;velero.io/v1/backups&lt;/span&gt;
      &lt;span class="na"&gt;namespaces&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
        &lt;span class="na"&gt;include&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
          &lt;span class="pi"&gt;-&lt;/span&gt; &lt;span class="s"&gt;all&lt;/span&gt;
      &lt;span class="na"&gt;events&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
        &lt;span class="pi"&gt;-&lt;/span&gt; &lt;span class="s"&gt;all&lt;/span&gt;
      &lt;span class="na"&gt;updateSetting&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
        &lt;span class="na"&gt;includeDiff&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="no"&gt;true&lt;/span&gt;
        &lt;span class="na"&gt;fields&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
          &lt;span class="pi"&gt;-&lt;/span&gt; &lt;span class="s"&gt;status.phase&lt;/span&gt;
    &lt;span class="pi"&gt;-&lt;/span&gt; &lt;span class="na"&gt;name&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;velero.io/v1/restores&lt;/span&gt;
      &lt;span class="na"&gt;namespaces&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
        &lt;span class="na"&gt;include&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
          &lt;span class="pi"&gt;-&lt;/span&gt; &lt;span class="s"&gt;all&lt;/span&gt;
      &lt;span class="na"&gt;events&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
        &lt;span class="pi"&gt;-&lt;/span&gt; &lt;span class="s"&gt;all&lt;/span&gt;
      &lt;span class="na"&gt;updateSetting&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
        &lt;span class="na"&gt;includeDiff&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="no"&gt;true&lt;/span&gt;
        &lt;span class="na"&gt;fields&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
          &lt;span class="pi"&gt;-&lt;/span&gt; &lt;span class="s"&gt;status.phase&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This configures BotKube to start monitoring &lt;code&gt;velero.io/v1/backups&lt;/code&gt; and &lt;code&gt;velero.io/v1/restores&lt;/code&gt; resource. It monitors all the operations like &lt;code&gt;create&lt;/code&gt;, &lt;code&gt;update&lt;/code&gt;, &lt;code&gt;delete&lt;/code&gt;, &lt;code&gt;error&lt;/code&gt; from all the namespaces.&lt;/p&gt;

&lt;p&gt;We are also monitoring the &lt;code&gt;status.Phase&lt;/code&gt; field of the Velero custom resources. This will create a notification when an operation is triggered.&lt;/p&gt;

&lt;p&gt;To update BotKube deployment, run the following Helm command.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;helm upgrade botkube infracloudio/botkube &lt;span class="nt"&gt;-n&lt;/span&gt; botkube &lt;span class="nt"&gt;-f&lt;/span&gt; botkube-values.yaml
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;em&gt;You can read more about this configuration in the &lt;a href="https://www.botkube.io/configuration/#resource-config-yaml-syntax"&gt;resource_config.yaml syntax&lt;/a&gt; documentation section.&lt;/em&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Let's test our BotKube setup
&lt;/h2&gt;

&lt;p&gt;We will deploy the example nginx application, present in the velero folder which was extracted from velero-x.y.z.tar.gz during installation.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nv"&gt;$ &lt;/span&gt;&lt;span class="nb"&gt;cd &lt;/span&gt;velero-v1.6.0-linux-amd64 
&lt;span class="nv"&gt;$ &lt;/span&gt;kubectl apply &lt;span class="nt"&gt;-f&lt;/span&gt; examples/nginx-app/base.yaml
namespace/nginx-example created
deployment.apps/nginx-deployment created
service/my-nginx created

&lt;span class="nv"&gt;$ &lt;/span&gt;kubectl get pods &lt;span class="nt"&gt;-n&lt;/span&gt; nginx-example            
NAME                               READY   STATUS    RESTARTS   AGE
nginx-deployment-57d5dcb68-xn8xc   1/1     Running   0          97s
nginx-deployment-57d5dcb68-zl26q   1/1     Running   0          97s

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Velero can backup or restore all objects in your cluster, or you can filter objects by type, namespace, and/or label. We are creating a backup &lt;code&gt;nginx-backup&lt;/code&gt; to include all resources from the &lt;code&gt;nginx-example&lt;/code&gt; namespace.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;velero backup create nginx-backup &lt;span class="nt"&gt;--include-namespaces&lt;/span&gt; nginx-example
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--jZNP0CVc--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/jfg9tgb6hfvcronxyvp1.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--jZNP0CVc--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/jfg9tgb6hfvcronxyvp1.png" alt="A Slack message by BotKube about Backup"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Wreak Havoc! Let's delete the example nginx application using below command :&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nv"&gt;$ &lt;/span&gt;&lt;span class="nb"&gt;cd &lt;/span&gt;velero-v1.6.0-linux-amd64
&lt;span class="nv"&gt;$ &lt;/span&gt;kubectl delete &lt;span class="nt"&gt;-f&lt;/span&gt; examples/nginx-app/base.yaml
namespace &lt;span class="s2"&gt;"nginx-example"&lt;/span&gt; deleted
deployment.apps &lt;span class="s2"&gt;"nginx-deployment"&lt;/span&gt; deleted
service &lt;span class="s2"&gt;"my-nginx"&lt;/span&gt; deleted

&lt;span class="nv"&gt;$ &lt;/span&gt;kubectl get pods &lt;span class="nt"&gt;-n&lt;/span&gt; nginx-example
No resources found &lt;span class="k"&gt;in &lt;/span&gt;nginx-example namespace.
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;We will now restore the &lt;code&gt;nginx-backup&lt;/code&gt; backup. We need to provide a backup name in the &lt;code&gt;--from-backup&lt;/code&gt; parameter to identify which backup we want to restore.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nv"&gt;$ &lt;/span&gt;velero restore create nginx-backup &lt;span class="nt"&gt;--from-backup&lt;/span&gt; nginx-backup
Restore request &lt;span class="s2"&gt;"nginx-backup"&lt;/span&gt; submitted successfully.
Run &lt;span class="sb"&gt;`&lt;/span&gt;velero restore describe nginx-backup&lt;span class="sb"&gt;`&lt;/span&gt; or &lt;span class="sb"&gt;`&lt;/span&gt;velero restore logs nginx-backup&lt;span class="sb"&gt;`&lt;/span&gt; &lt;span class="k"&gt;for &lt;/span&gt;more details.
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--4FhVEC_2--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/eem6bofd2vipgolzcpqo.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--4FhVEC_2--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/eem6bofd2vipgolzcpqo.png" alt="A Slack message by BotKube about Restore"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Conclusion
&lt;/h2&gt;

&lt;p&gt;In this post, we discussed what BotKube and Velero are. We also looked at how you can configure BotKube to monitor Velero backups for your Kubernetes clusters. Similarly, we can use BotKube to monitor any custom resources by updating the resource configurations. &lt;/p&gt;

&lt;p&gt;Hope you found this blog post informative and engaging. If you have any questions, feel free to reach out to me on &lt;a href="//www.linkedin.com/in/aashi-modi"&gt;LinkedIn&lt;/a&gt;. For regular cloud native updates from InfraCloud, follow us on &lt;a href="https://www.linkedin.com/company/infracloudio/"&gt;LinkedIn&lt;/a&gt; and &lt;a href="https://twitter.com/infracloudio"&gt;Twitter&lt;/a&gt;.&lt;/p&gt;

</description>
      <category>devops</category>
      <category>kubernetes</category>
      <category>monitoring</category>
      <category>velero</category>
    </item>
  </channel>
</rss>
