> For the complete documentation index, see [llms.txt](https://docs.cennso.com/components/npp/3.0/llms.txt) (all documentation: [llms.txt](https://docs.cennso.com/llms.txt)). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.cennso.com/components/npp/3.0/tutorials/deploy-download-monitor.md).

# Deploy Download Monitor

This tutorial describes how to install and configure the Download Monitor probe on the Kubernetes cluster. Download Monitor constantly executes download tests in the cluster environment and exposes results as Prometheus metrics.

## Prerequisites

- [NPP installed](https://docs.cennso.com/components/npp/3.0/installation.md) on a Kubernetes cluster
- kubectl

## Steps

1. Create a namespace for your configuration:

    ```bash
    kubectl create namespace download-monitor-tutorial
    ```

1. Deploy the test application where the probe will be injected:

    ```bash
    kubectl create deployment nginx --image=nginx --namespace download-monitor-tutorial
    ```

1. Create a Download Monitor manifest and configure it according to your needs. To do so, create a YAML file with the following DownloadMonitor CustomResource (CR):

    ```yaml
    apiVersion: probe.cennso.com/v1alpha1
    kind: DownloadMonitor
    metadata:
      name: download-monitor-sample
    spec:
      podSelector:
        labels:
          app: nginx
      container: nginx
      imagePullSecrets:
        - name: regcred
      interval: 30s
      timeout: 60s
      configurations:
        - name: Download from any interface
          source: 0.0.0.0
          nameserver: 8.8.8.8
          targets:
            - address: https://google.com
              name: Google Website
    ```

1. Apply the CR to the cluster by running this command:

    ```bash
    kubectl apply --namespace download-monitor-tutorial -f {FILENAME}.yaml
    ```

## Verification

1. Run this command to check if Download Monitor is running:

    ```bash
    kubectl get downloadmonitors.probe.cennso.com download-monitor-sample --namespace download-monitor-tutorial
    ```

   If the deployment is successful, the output shows that it is configured, deployed and ready:

    ```bash
    NAME                      CONFIGURED   DEPLOYED   READY   AGE
    download-monitor-sample   True         True       True    1m
    ```

1. Download statistics are available as Prometheus metrics exposed on the `9100` port.
