Skip to main content
Enterprise

NetBoxEnterprise CRD Reference

The NetBoxEnterprise custom resource defines a complete NetBox Enterprise deployment. The nbe-operator watches these resources and reconciles them into the appropriate Kubernetes objects.

API Details:

FieldValue
Groupnetboxlabs.com
Versionv1alpha1
KindNetBoxEnterprise
ScopeNamespaced
Short namenbe

Full CRD: netboxenterprises.netboxlabs.com-v2.0.0.yaml

Minimal Example

apiVersion: netboxlabs.com/v1alpha1
kind: NetBoxEnterprise
metadata:
name: netbox
namespace: netbox
spec:
netbox:
replicas: 1
worker:
replicas: 1
postgresql:
external: false
redis:
external: false

Full Example

apiVersion: netboxlabs.com/v1alpha1
kind: NetBoxEnterprise
metadata:
name: netbox
namespace: netbox
spec:
suspend: false
maintenanceMode: false

labels:
app.kubernetes.io/managed-by: netbox-operator

imagePullSecrets:
- netbox-enterprise-registry

netbox:
replicas: 2
httpPort: 8080
mediaStorageSize: "10Gi"
urls:
- "https://netbox.example.com"
resources:
cpu: 500
memory: 1024
limits:
cpu: 2000
memory: 2048
worker:
replicas: 2
resources:
cpu: 200
memory: 256
limits:
cpu: 1000
memory: 1500
config:
metricsEnabled: true
allowedHosts:
- "*"

postgresql:
external: false
instances: 2
version: "18"
storageSize: "20Gi"
resources:
cpu: 500
memory: 1024
limits:
cpu: 2000
memory: 2048

redis:
external: false
clusterSize: 3
persistence: true
storageSize: "2Gi"
resources:
cpu: 250
memory: 256
limits:
cpu: 500
memory: 512

diode:
enabled: true
reconciler:
replicas: 1
ingester:
replicas: 1
auth:
replicas: 1
hydra:
replicas: 1
config:
reconciler:
# autoApplyChangesets: true # false recommended if using Assurance
logLevel: INFO

Spec Reference

Top-Level Fields

FieldTypeDefaultDescription
suspendboolfalsePause reconciliation — existing workloads keep running
maintenanceModeboolfalseScale down all app components, keep databases running
labelsmap[string]stringLabels applied to all managed resources
annotationsmap[string]stringAnnotations applied to all managed resources
imagePullPolicystringIfNotPresentDefault image pull policy
imagePullSecrets[]stringPull secrets for private registries
registrystringContainer registry host override for all images
registryNamespacestringRegistry namespace for flat-namespace registries (e.g., airgap). When set alongside registry, repository paths are flattened to {namespace}/{basename}
clusterDnsSuffixstringKubernetes cluster DNS suffix (defaults to cluster.local)

spec.postgresqlProfiles

Named PostgreSQL connection profiles that components can reference by name. This avoids duplicating host, port, and TLS settings across components when they share the same database server.

postgresqlProfiles:
netbox:
host: db.example.com
port: 5432
username: netbox
tlsConfig:
sslmode: verify-full
keychainCaCertificates: ['pgo']
FieldTypeDefaultDescription
postgresqlProfiles.<name>.hoststringPostgreSQL hostname
postgresqlProfiles.<name>.portuint16PostgreSQL port
postgresqlProfiles.<name>.usernamestringPostgreSQL username
postgresqlProfiles.<name>.tlsConfigobjectTLS configuration (see PostgreSQL TLS)

PostgreSQL Profile tlsConfig

FieldTypeDefaultDescription
sslmodeenumpreferdisable, allow, prefer, require, verify-ca, verify-full
insecureSkipVerifyboolfalseSkip TLS verification
keychainCaCertificates[]stringCA names from tlsKeychain
keychainClientCertificatestringClient cert name from tlsKeychain
note

When CA certificates are configured via keychainCaCertificates, libpq verifies the server certificate even with sslmode: require (effectively upgrading it to verify-ca behavior). This is because the operator sets PGSSLROOTCERT when CA certificates are provided. If you need require without verification, omit the CA certificates.

spec.netbox

Required. NetBox application deployment configuration.

FieldTypeDefaultDescription
replicasuint81Web application replicas (0–255)
httpPortuint168080HTTP port
statusPortuint168081Health check port
mediaStorageSizestring10GiMedia PVC size
scriptsStorageSizestring1GiScripts PVC size
storageClassNamestringStorage class override
urls[]stringExternal URLs (configures ingress)
registrystringContainer registry override
imagePullPolicystringIfNotPresentImage pull policy
resources.cpuint200CPU request (millicores)
resources.memoryint750Memory request (MiB)
limits.cpuint1000CPU limit (millicores)
limits.memoryint1500Memory limit (MiB)
env[]EnvVarEnvironment variables
yamlEnvstringYAML string of env vars

spec.netbox.image

FieldTypeDefaultDescription
registrystringghcr.ioContainer registry
repositorystringnetbox-community/netboxImage repository
tagstringChart-dependentImage tag
digeststringImage digest for pinning
pullPolicystringIfNotPresentPull policy

spec.netbox.worker (Required)

FieldTypeDefaultDescription
replicasuint81Worker replicas
resources.cpuint100CPU request (millicores)
resources.memoryint128Memory request (MiB)
limits.cpuint1000CPU limit (millicores)
limits.memoryint1500Memory limit (MiB)

spec.netbox.config

FieldTypeDefaultDescription
allowedHosts[]string['*']Django allowed hosts
metricsEnabledboolfalseExpose /metrics endpoint
customPythonConfigstringInline custom Python config
customPythonConfigRefConfigMapKeySelectorConfigMap ref for Python config
secretKeySecretKeySelectorAuto-generatedDjango secret key
emailPasswordSecretKeySelectorEmail password
superuserobjectAuto-generatedSuperuser credentials (all 4 fields required if set)
storage.s3.enabledboolfalseEnable S3 media storage
storage.s3.tlsConfigobjectS3 TLS/mTLS configuration (see S3 TLS)

S3 Storage TLS

The storage.s3.tlsConfig field uses the keychain TLS pattern for custom CA certificates and client certificates (mTLS):

FieldTypeDefaultDescription
tlsConfig.insecureSkipVerifyboolfalseSkip SSL certificate verification
tlsConfig.keychainCaCertificates[]stringCA names from tlsKeychain for server verification
tlsConfig.keychainClientCertificatestringClient cert name from tlsKeychain for mTLS

spec.postgresql

Required. PostgreSQL database configuration.

FieldTypeDefaultDescription
externalboolfalseUse external PostgreSQL
instancesuint81PGO replica count (internal only)
versionstring18PostgreSQL major version
storageSizestring4GiStorage per instance
storageClassNamestringStorage class
registrystringImage registry override
postgresqlProfilestringName of a profile from postgresqlProfiles for host, port, and TLS config
resources.cpuintCPU request (millicores). Optional — when unset, no requests are applied
resources.memoryintMemory request (MiB). Optional — when unset, no requests are applied
limits.cpuintCPU limit (millicores). Optional — when unset, no limits are applied
limits.memoryintMemory limit (MiB). Optional — when unset, no limits are applied

spec.redis

Required. Redis cache/queue configuration.

FieldTypeDefaultDescription
externalboolfalseUse external Redis
namestringredisInstance name
clusterSizeuint81Redis replicas
persistencebooltrueEnable persistence
requireAuthboolfalseRequire authentication
resources.cpuintCPU request (millicores). Optional — when unset, no requests are applied
resources.memoryintMemory request (MiB). Optional — when unset, no requests are applied
limits.cpuintCPU limit (millicores). Optional — when unset, no limits are applied
limits.memoryintMemory limit (MiB). Optional — when unset, no limits are applied
storageClassNamestringStorage class
storageSizestring1GiStorage size for Redis PVCs (when persistence is enabled)

spec.redis.tlsConfig

FieldTypeDefaultDescription
insecureSkipVerifyboolfalseSkip TLS verification
keychainCaCertificates[]stringCA names from tlsKeychain
keychainClientCertificatestringClient cert name from tlsKeychain

spec.diode

Optional. Diode data ingestion pipeline.

FieldTypeDefaultDescription
enabledbooltrueEnable Diode
reconciler.replicasuint81Reconciler replicas
ingester.replicasuint81Ingester replicas
auth.replicasuint81Auth replicas
hydra.replicasuint81Hydra replicas
hydra.autoMigratebooltrueAuto-run Hydra DB migrations
hydra.postgresqlProfilestringPostgreSQL profile for Hydra's database connection

Each component also has resources, limits, annotations, labels, extraEnvs, and image fields. Service account names are auto-generated from the cluster name (e.g., {name}-diode-ingester) unless explicitly overridden.

spec.diode.config.reconciler

FieldTypeDefaultDescription
autoApplyChangesetsbooltrue (without Assurance), false (with Assurance)Auto-apply change sets. Defaults based on Assurance license.
logLevelenumINFOINFO, DEBUG, WARN, ERROR
databaseNamestringdiodePostgreSQL database
databaseUserstringdiodePostgreSQL user
migrationEnabledbooltrueRun DB migrations
redisDbuint80Redis database number
redisStreamDbuint81Redis stream database
rateLimitRpsuint820Rate limit (req/sec)
postgres.postgresqlProfilestringPostgreSQL profile for Diode's database connection

spec.tlsKeychain

Centralized TLS certificate management.

spec.tlsKeychain.caCertificateSecrets[]

FieldTypeDefaultDescription
namestringRequiredLogical name (referenced in tlsConfig)
secretstringSame as nameKubernetes secret name
keystringca.crtKey within the secret

spec.tlsKeychain.clientCertificateSecrets[]

FieldTypeDefaultDescription
namestringRequiredLogical name
secretstringSame as nameKubernetes secret name
certKeystringtls.crtCertificate key
privateKeystringtls.keyPrivate key

spec.extraCaCertificates

Additional CA certificates to trust system-wide. Added to the system trust store of all NetBox components, merged into every service-specific CA bundle (PostgreSQL, Redis), and set as REQUESTS_CA_BUNDLE so Python HTTP clients (e.g., webhooks, custom scripts) also trust these CAs.

extraCaCertificates:
- name: internal-ca-secret
key: ca.crt

Next Steps