netbox
by HelmForge
NetBox infrastructure resource modeling with web, worker, and housekeeping workloads
About this chart
NetBox
Deploy NetBox, the infrastructure resource modeling and source-of-truth platform for DCIM and IPAM, using its official container image.
Features
- Official pinned NetBox/netbox-docker image for amd64 and arm64.
- Separate Granian web, RQ worker and housekeeping workloads.
- Maintained PostgreSQL and Redis dependencies plus external-service modes.
- Persistent media with fail-fast multi-replica storage validation.
- Generated, existing and External Secrets identity contracts.
- Ingress, Gateway API, dual-stack Service and product-aware NetworkPolicy.
- Native Prometheus metrics, ServiceMonitor and operational Helm tests.
- Configurable real Granian listener independent from the Service port.
Architecture
The chart models NetBox as three independent Kubernetes workloads:
- a web Deployment running the official Granian WSGI entrypoint;
- an RQ worker Deployment for asynchronous jobs;
- a nightly CronJob for the upstream
housekeepingcommand.
PostgreSQL stores authoritative application data. Redis database 0 carries trusted background jobs and database 1 is used for cache. User-uploaded media is kept on a separate PVC. The default installation deploys HelmForge PostgreSQL and Redis subcharts. Authentication is mandatory, matching the NetBox 4.6 security model.
Installation
helm repo add helmforge https://repo.helmforge.dev
helm install netbox helmforge/netbox \
--namespace netbox \
--create-namespace \
--wait
Retrieve the generated initial password:
kubectl get secret -n netbox netbox-superuser \
-o jsonpath='{.data.password}' | base64 -d
Then forward the Service and open http://127.0.0.1:8080/:
kubectl port-forward -n netbox svc/netbox 8080:80
Production decisions
Use existing Secrets or External Secrets for the Django secret, API-token
pepper, database password, Redis password, and bootstrap credentials. Disable
the bootstrap superuser after provisioning. Restrict allowedHosts, terminate
TLS at an Ingress or Gateway, and enable network policy and metrics.
Web replicas share media. More than one web replica is rejected unless the PVC
declares ReadWriteMany; object-storage configuration can instead be supplied
through netbox.extraConfiguration. Back up PostgreSQL and media as two
coordinated domains. Redis cache is rebuildable, while the task database can
contain pending jobs and must not be exposed to untrusted writers.
See production operations, secrets, and networking and observability.
Configuration
containerPorts.http configures the real Granian HTTP listener through the
server's --port command-line option. service.port independently controls
the Kubernetes Service-facing port and targets the named http container
port. The defaults are 8080 and 80, respectively.
containerPorts:
http: 8181
service:
port: 8080
This example makes NetBox listen on 8181 while clients connect to the Service on 8080. Probes follow the named container port. Listener values below 1024 are rejected because the application runs without root or added capabilities.
| Value | Default | Purpose |
|---|---|---|
containerPorts.http | 8080 | Granian process listener |
service.port | 80 | Kubernetes Service-facing port |
web.replicaCount | 1 | NetBox web replicas |
worker.replicaCount | 1 | RQ worker replicas |
persistence.enabled | true | Persist uploaded media |
database.mode | auto | Select bundled or external PostgreSQL |
cache.mode | auto | Select bundled or external Redis |
networkPolicy.enabled | false | Enable application traffic isolation |
networkPolicy.ingressFrom | [] | Explicit HTTP ingress peers; empty permits IPv4 and IPv6 clients to the listener |
See values.yaml and values.schema.json for the complete validated contract.
External services
Disable the bundled dependencies and reference existing credentials:
postgresql:
enabled: false
redis:
enabled: false
database:
mode: external
external:
host: postgresql.database.svc
existingSecret: netbox-postgresql
cache:
mode: external
external:
host: redis.cache.svc
existingSecret: netbox-redis
The PostgreSQL Secret key defaults to password; the Redis Secret key also
defaults to password.
Custom configuration and plugins
The official image loads Python files from /etc/netbox/config. Add settings
that are not represented by upstream environment variables through
netbox.extraConfiguration. Plugins must be installed in a derived image; the
chart never downloads executable packages at pod startup.
image:
repository: registry.example.com/platform/netbox
tag: "4.6.5-company.1"
netbox:
extraConfiguration:
plugins.py: |
PLUGINS = ["netbox_topology_views"]
Routing
Ingress uses ingress.ingressClassName. Gateway API uses the canonical
gatewayAPI.httpRoutes[] contract and defaults each route to the NetBox
Service when no backend is supplied.
Observability
Set both netbox.metricsEnabled=true and
metrics.serviceMonitor.enabled=true. The ServiceMonitor scrapes /metrics.
Web and worker logs remain on standard output. Probes call /login/, which
also verifies database-backed Django startup.
Security
All NetBox containers run without root or added capabilities, block privilege escalation, use RuntimeDefault seccomp and receive no Kubernetes API token. Application identity and credentials belong in retained Kubernetes Secrets or External Secrets, never ConfigMaps. Restrict the bootstrap administrator, terminate public traffic with HTTPS and treat Redis database 0 as a trusted job-execution boundary.
NetworkPolicy is opt-in. When egress enforcement is enabled, explicitly allow DNS, PostgreSQL, Redis and every private identity, email, webhook or plugin destination. Enabling ingress isolation alone leaves egress unrestricted.
Security Scan
Security Scan: netbox
| Framework | Score |
|---|---|
| MITRE + NSA + SOC2 | 85.43% |
Security posture acceptable.
Local details:
- Tool: Kubescape v4.0.13
- Command:
kubescape scan framework mitre,nsa,soc2 .tmp/netbox-render.yaml - Result: 0 critical failed resources, resource summary score 85.43%.
Examples
- Simple
- External services
- Production
Troubleshooting
- If web startup is slow, inspect migration logs before restarting the pod.
- If workers remain in init, verify the web migration completed and PostgreSQL is reachable.
- If probes return HTTP 400, keep
localhostinnetbox.allowedHosts. The startup, liveness, and readiness probes sendHost: localhost. Also add the public hostname for external clients. - If a custom listener fails, confirm the rendered Granian
--portargument and the namedhttpcontainer port both matchcontainerPorts.http. - If multiple replicas are rejected, use ReadWriteMany media or an external media backend instead of bypassing the storage guard.
Scope boundaries
This chart deploys NetBox and its standard operational processes. It does not install arbitrary plugins at runtime, create external databases, provision object-storage buckets, or claim database-level high availability when the standalone dependency defaults are used.
Deploy netbox with OpenTenant
Each tenant gets its own release of this chart, with its own namespace, secrets and domain. The builder below already has netbox on a Hetzner server. Change the host, add apps from the marketplace, then copy the generated files. Providers and prices are samples, and nothing here is sent anywhere.
- Pick a serverConnect Hetzner, OVHcloud or AWS. The builder starts on Hetzner, the cheapest sample rate.
- Place the chartnetbox is pinned at v2.0.8 in opentenant.yaml. Drag more apps from the marketplace onto a rack.
- ApplySave opentenant.yaml and main.tf from the console, then run the commands below.
# opentenant.yaml, main.tf and dns.tf come from the builder below opentenant validate opentenant.yaml terraform init && terraform apply