1. Answers
  2. Deploy NetBox Helm Chart on DigitalOcean Kubernetes

How do I deploy the NetBox Helm chart on DigitalOcean Kubernetes?

In this guide, we will deploy the NetBox Helm chart on a DigitalOcean Kubernetes Service (DOKS) cluster using Pulumi. We will create a Kubernetes cluster on DigitalOcean, and then use the Pulumi Kubernetes provider to deploy the NetBox Helm chart.

import * as pulumi from "@pulumi/pulumi";
import * as digitalocean from "@pulumi/digitalocean";
import * as k8s from "@pulumi/kubernetes";

// Create a DigitalOcean Kubernetes cluster
const cluster = new digitalocean.KubernetesCluster("netbox-cluster", {
    region: digitalocean.Region.NYC3,
    version: "1.22.8-do.0",
    nodePool: {
        name: "default",
        size: digitalocean.DropletSlug.DropletS2VCPU2GB,
        nodeCount: 3,
    },
});

// Export the cluster's kubeconfig
export const kubeconfig = cluster.kubeConfigs[0].rawConfig;

// Create a Kubernetes provider instance using the cluster's kubeconfig
const k8sProvider = new k8s.Provider("k8s-provider", {
    kubeconfig: kubeconfig,
});

// Deploy the NetBox Helm chart
const netboxChart = new k8s.helm.v3.Chart("netbox", {
    chart: "netbox",
    version: "1.0.0",
    fetchOpts: {
        repo: "https://charts.bitnami.com/bitnami",
    },
    values: {
        postgresql: {
            enabled: true,
        },
        redis: {
            enabled: true,
        },
    },
}, { provider: k8sProvider });

Key Points

  • We created a DigitalOcean Kubernetes cluster using the digitalocean.KubernetesCluster resource.
  • We exported the cluster’s kubeconfig to configure the Kubernetes provider.
  • We deployed the NetBox Helm chart using the k8s.helm.v3.Chart resource.

Summary

In this guide, we deployed the NetBox Helm chart on a DigitalOcean Kubernetes cluster using Pulumi. We created the Kubernetes cluster, configured the Kubernetes provider, and deployed the Helm chart, ensuring that all necessary components like PostgreSQL and Redis were enabled.

Deploy this code

Want to deploy this code? Sign up for a free Pulumi account to deploy in a few clicks.

Sign up

New to Pulumi?

Want to deploy this code? Sign up with Pulumi to deploy in a few clicks.

Sign up