Skip to main content

NetBox Enterprise Helm Deployment Examples

Beta Notice: These Helm charts are currently in beta. While stable for testing and development environments, please thoroughly test in your specific environment before production deployment. For the most up-to-date information, please refer to the main documentation.

This guide provides detailed deployment examples for NetBox Enterprise using Helm across different platforms and scenarios.

Need the basics first? See Installation Guide for standard installation steps, or Prerequisites for system requirements.

Production Deployment Examples

AWS EKS Deployment

Prerequisites

  • AWS CLI configured with appropriate permissions
  • kubectl installed and configured
  • Helm 3.x installed
  • jq for JSON processing

EKS Cluster Setup

# Install required tools
curl -LO "https://dl.k8s.io/release/$(curl -L -s https://dl.k8s.io/release/stable.txt)/bin/linux/amd64/kubectl"
sudo install -o root -g root -m 0755 kubectl /usr/local/bin/kubectl

# Install Helm
curl https://raw.githubusercontent.com/helm/helm/main/scripts/get-helm-3 | bash

# Set default storage class
kubectl patch storageclass gp2 -p '{"metadata": {"annotations":{"storageclass.kubernetes.io/is-default-class":"true"}}}'

NetBox Enterprise Installation

# Login to Replicated registry
echo "your-license-key" | docker login registry.replicated.com -u your-username --password-stdin

# Pull and push images to private registry (if using private registry)
docker pull registry.replicated.com/netbox-enterprise/beta/netbox-enterprise:1.11.4
docker tag registry.replicated.com/netbox-enterprise/beta/netbox-enterprise:1.11.4 your-registry.com/netbox-enterprise:1.11.4
docker push your-registry.com/netbox-enterprise:1.11.4

# Install NetBox Enterprise
helm install netbox-enterprise \
oci://registry.replicated.com/netbox-enterprise/beta/netbox-enterprise \
--version 1.11.4 \
--values values-production.yaml

# Get external IP
kubectl get svc netbox-enterprise-nginx-ingress-controller -w

Azure AKS Deployment

Prerequisites

  • Azure CLI installed and configured
  • kubectl installed
  • Helm 3.x installed

AKS Cluster Setup

# Install Azure CLI (if not already installed)
curl -sL https://aka.ms/InstallAzureCLIDeb | sudo bash

# Login to Azure
az login

# Install kubectl
az aks install-cli

# Get cluster credentials
az aks get-credentials --resource-group your-resource-group --name your-cluster-name

# Install Helm
curl https://raw.githubusercontent.com/helm/helm/main/scripts/get-helm-3 | bash

NetBox Enterprise Installation

# Login to Replicated registry
echo "your-license-key" | docker login registry.replicated.com -u your-username --password-stdin

# Install NetBox Enterprise
helm install netbox-enterprise \
oci://registry.replicated.com/netbox-enterprise/beta/netbox-enterprise \
--version 1.11.4 \
--values values-azure.yaml

# Get external IP
kubectl get svc netbox-enterprise-nginx-ingress-controller -w

Private Registry Configuration

Complete Private Registry Setup

Image List for Private Registry

# Core NetBox Enterprise images
registry.replicated.com/netbox-enterprise/beta/netbox-enterprise:1.11.4
registry.replicated.com/netbox-enterprise/beta/netbox-enterprise-worker:1.11.4
registry.replicated.com/netbox-enterprise/beta/netbox-enterprise-nginx:1.11.4

# Database images
postgres:13
redis:7-alpine

# Infrastructure images
nginx/nginx-ingress:3.4.0
bitnami/postgresql:13
bitnami/redis:7.0

Automated Registry Population Script

#!/bin/bash
# private-registry-setup.sh

set -e

REPLICATED_REGISTRY="registry.replicated.com"
PRIVATE_REGISTRY="your-private-registry.com"
VERSION="1.11.4"

# NetBox Enterprise images
IMAGES=(
"netbox-enterprise/beta/netbox-enterprise:${VERSION}"
"netbox-enterprise/beta/netbox-enterprise-worker:${VERSION}"
"netbox-enterprise/beta/netbox-enterprise-nginx:${VERSION}"
)

# External dependencies
EXTERNAL_IMAGES=(
"postgres:13"
"redis:7-alpine"
"nginx/nginx-ingress:3.4.0"
"bitnami/postgresql:13"
"bitnami/redis:7.0"
)

echo "Setting up private registry with NetBox Enterprise images..."

# Login to Replicated registry
echo "Logging into Replicated registry..."
echo "${REPLICATED_PASSWORD}" | docker login ${REPLICATED_REGISTRY} -u ${REPLICATED_USERNAME} --password-stdin

# Login to private registry
echo "Logging into private registry..."
echo "${PRIVATE_REGISTRY_PASSWORD}" | docker login ${PRIVATE_REGISTRY} -u ${PRIVATE_REGISTRY_USERNAME} --password-stdin

# Process NetBox Enterprise images
for image in "${IMAGES[@]}"; do
echo "Processing ${image}..."

# Pull from Replicated
docker pull ${REPLICATED_REGISTRY}/${image}

# Tag for private registry
docker tag ${REPLICATED_REGISTRY}/${image} ${PRIVATE_REGISTRY}/${image}

# Push to private registry
docker push ${PRIVATE_REGISTRY}/${image}
done

# Process external images
for image in "${EXTERNAL_IMAGES[@]}"; do
echo "Processing ${image}..."

# Pull from Docker Hub
docker pull ${image}

# Tag for private registry
docker tag ${image} ${PRIVATE_REGISTRY}/${image}

# Push to private registry
docker push ${PRIVATE_REGISTRY}/${image}
done

echo "Private registry setup complete!"

Values File for Private Registry

# values-private-registry.yaml
global:
imageRegistry: "your-private-registry.com"
imagePullSecrets:
- name: "private-registry-secret"

netbox:
image:
registry: "your-private-registry.com"
repository: "netbox-enterprise/beta/netbox-enterprise"
tag: "1.11.4"

worker:
image:
registry: "your-private-registry.com"
repository: "netbox-enterprise/beta/netbox-enterprise-worker"
tag: "1.11.4"

nginx:
image:
registry: "your-private-registry.com"
repository: "netbox-enterprise/beta/netbox-enterprise-nginx"
tag: "1.11.4"

postgresql:
image:
registry: "your-private-registry.com"
repository: "bitnami/postgresql"
tag: "13"

redis:
image:
registry: "your-private-registry.com"
repository: "bitnami/redis"
tag: "7.0"

External Database Configuration

Multiple Database Secrets Creation

Manual Secret Creation

# Create secrets for each database
kubectl create secret generic external-postgres-secret-netbox \
--from-literal=uri="postgres://netbox_user:$(printf '%s' 'complex$password' | jq -sRr @uri)@postgres.example.com:5432/netbox_db"

kubectl create secret generic external-postgres-secret-diode \
--from-literal=uri="postgres://diode_user:$(printf '%s' 'complex$password' | jq -sRr @uri)@postgres.example.com:5432/diode_db"

kubectl create secret generic external-postgres-secret-hydra \
--from-literal=uri="postgres://hydra_user:$(printf '%s' 'complex$password' | jq -sRr @uri)@postgres.example.com:5432/hydra_db"

Password Encoding for Special Characters

# For passwords with special characters, use jq for URL encoding
PASSWORD='my$pecial@password!'
ENCODED_PASSWORD=$(printf '%s' "$PASSWORD" | jq -sRr @uri)
echo "Encoded password: $ENCODED_PASSWORD"

# Use encoded password in connection string
CONNECTION_STRING="postgres://username:${ENCODED_PASSWORD}@hostname:5432/database"

External Database Values Configuration

# values-external-db.yaml
postgresql:
enabled: false

externalDatabase:
netbox:
existingSecret: "external-postgres-secret-netbox"
existingSecretKey: "uri"

diode:
existingSecret: "external-postgres-secret-diode"
existingSecretKey: "uri"

hydra:
existingSecret: "external-postgres-secret-hydra"
existingSecretKey: "uri"

redis:
enabled: false

externalRedis:
host: "redis.example.com"
port: 6379
password: "redis-password"

Advanced Configuration Examples

High Availability Setup

# values-ha.yaml
replicaCount: 3

netbox:
replicas: 3
resources:
requests:
memory: "2Gi"
cpu: "1000m"
limits:
memory: "4Gi"
cpu: "2000m"

worker:
replicas: 2
resources:
requests:
memory: "1Gi"
cpu: "500m"
limits:
memory: "2Gi"
cpu: "1000m"

postgresql:
enabled: false # Use external managed database

redis:
enabled: false # Use external managed Redis

ingress:
enabled: true
annotations:
kubernetes.io/ingress.class: "nginx"
cert-manager.io/cluster-issuer: "letsencrypt-prod"
nginx.ingress.kubernetes.io/ssl-redirect: "true"
hosts:
- host: netbox.example.com
paths:
- path: /
pathType: Prefix
tls:
- secretName: netbox-tls
hosts:
- netbox.example.com

Resource Optimization

# values-optimized.yaml
resources:
netbox:
requests:
memory: "1Gi"
cpu: "500m"
limits:
memory: "2Gi"
cpu: "1000m"

worker:
requests:
memory: "512Mi"
cpu: "250m"
limits:
memory: "1Gi"
cpu: "500m"

postgresql:
requests:
memory: "512Mi"
cpu: "250m"
limits:
memory: "1Gi"
cpu: "500m"

redis:
requests:
memory: "256Mi"
cpu: "100m"
limits:
memory: "512Mi"
cpu: "200m"

Deployment Automation

⚠️ Testing Required: These CI/CD pipeline examples are provided as templates and must be tested and customized for your specific environment. Update registry URLs, credentials, and deployment configurations before use.

CI/CD Pipeline Example (GitLab CI)

# .gitlab-ci.yml
stages:
- validate
- deploy

variables:
HELM_VERSION: "3.14.0"
KUBECTL_VERSION: "1.28.0"

validate_deployment:
stage: validate
script:
- helm lint ./helm-values/
- helm template netbox-enterprise oci://registry.replicated.com/netbox-enterprise/beta/netbox-enterprise --values values-production.yaml --version 1.11.4 > /tmp/manifests.yaml
- kubectl --dry-run=client apply -f /tmp/manifests.yaml

deploy_staging:
stage: deploy
script:
- helm upgrade --install netbox-enterprise-staging \
oci://registry.replicated.com/netbox-enterprise/beta/netbox-enterprise \
--values values-staging.yaml \
--version 1.11.4 \
--namespace netbox-staging \
--create-namespace
environment:
name: staging
url: https://netbox-staging.example.com

deploy_production:
stage: deploy
script:
- helm upgrade --install netbox-enterprise \
oci://registry.replicated.com/netbox-enterprise/beta/netbox-enterprise \
--values values-production.yaml \
--version 1.11.4 \
--namespace netbox \
--create-namespace
environment:
name: production
url: https://netbox.example.com
when: manual
only:
- main

GitHub Actions Example

# .github/workflows/deploy.yml
name: Deploy NetBox Enterprise

on:
push:
branches: [main]
pull_request:
branches: [main]

jobs:
deploy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3

- name: Install Helm
uses: azure/setup-helm@v3
with:
version: '3.14.0'

- name: Configure kubectl
uses: azure/k8s-set-context@v3
with:
method: kubeconfig
kubeconfig: ${{ secrets.KUBECONFIG }}

- name: Login to Replicated
run: |
echo "${{ secrets.REPLICATED_PASSWORD }}" | helm registry login registry.replicated.com -u ${{ secrets.REPLICATED_USERNAME }} --password-stdin

- name: Deploy to staging
if: github.event_name == 'pull_request'
run: |
helm upgrade --install netbox-enterprise-staging \
oci://registry.replicated.com/netbox-enterprise/beta/netbox-enterprise \
--values values-staging.yaml \
--version 1.11.4 \
--namespace netbox-staging \
--create-namespace

- name: Deploy to production
if: github.ref == 'refs/heads/main'
run: |
helm upgrade --install netbox-enterprise \
oci://registry.replicated.com/netbox-enterprise/beta/netbox-enterprise \
--values values-production.yaml \
--version 1.11.4 \
--namespace netbox \
--create-namespace

Validation and Testing

Deployment Validation Script

⚠️ Testing Required: This validation script should be tested in your environment before use. Commands may need adjustment based on your specific deployment configuration.

#!/bin/bash
# validate-deployment.sh

set -e

NAMESPACE="netbox"
RELEASE_NAME="netbox-enterprise"

echo "Validating NetBox Enterprise deployment..."

# Check pod status
echo "Checking pod status..."
kubectl get pods -n $NAMESPACE -l app.kubernetes.io/instance=$RELEASE_NAME

# Wait for pods to be ready
echo "Waiting for pods to be ready..."
kubectl wait --for=condition=ready pod -l app.kubernetes.io/instance=$RELEASE_NAME -n $NAMESPACE --timeout=600s

# Check service endpoints
echo "Checking service endpoints..."
kubectl get svc -n $NAMESPACE -l app.kubernetes.io/instance=$RELEASE_NAME

# Test HTTP connectivity
echo "Testing HTTP connectivity..."
SERVICE_IP=$(kubectl get svc ${RELEASE_NAME}-nginx-ingress-controller -n $NAMESPACE -o jsonpath='{.status.loadBalancer.ingress[0].ip}')
if curl -s -o /dev/null -w "%{http_code}" http://$SERVICE_IP | grep -q "200"; then
echo "✓ HTTP connectivity successful"
else
echo "✗ HTTP connectivity failed"
exit 1
fi

# Check database connectivity
echo "Checking database connectivity..."
kubectl exec -n $NAMESPACE deployment/$RELEASE_NAME-netbox -- python manage.py check --database default

echo "✓ Deployment validation complete!"

Next Steps

After completing your deployment:

  1. Operations Guide - Backup procedures, maintenance tasks, and upgrade procedures
  2. Values Guide - Configuration reference and customization options
  3. Troubleshooting - Common issues and diagnostic procedures

This comprehensive deployment guide provides detailed examples for various platforms and scenarios while keeping the main installation guide focused on the essential steps. The advanced content is now properly organized and includes all the platform-specific details from the original Pure Helm Installation document.