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.1.2.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]string-Labels applied to all managed resources
annotationsmap[string]string-Annotations applied to all managed resources
imagePullPolicystringIfNotPresentDefault image pull policy
imagePullSecrets[]string-Pull secrets for private registries
registrystring-Container registry host override for all images
registryNamespacestring-Registry namespace for flat-namespace registries (e.g., airgap). When set alongside registry, repository paths are flattened to {namespace}/{basename}
clusterDnsSuffixstring-Kubernetes cluster DNS suffix (defaults to cluster.local)
reconcileIntervalstringunset (operator falls back to 5m)How often the operator re-checks external state when no Kubernetes events are received. Covers changes that do not produce watch events (PGO secret rotations, wheelhouse uploads). Kubernetes-style duration string (30s, 1m, 5m) or bare seconds.
secretChecksumDebouncestringunset (operator falls back to 30s)Debounce window for embedding external secret resourceVersion into pod template annotations. Prevents PGO housekeeping writes from triggering rolling restarts. Kubernetes-style duration string or bare seconds. Lower values speed up convergence in test environments; raise it for slow-bootstrapping clusters.
backupsboolfalseEnable Velero backups for this cluster. Requires Velero installed in the cluster.
note

Each operator-managed workload section (spec.netbox, spec.netbox.worker, spec.copilot, and each spec.diode.<component>) accepts a topologySpreadConstraints array using the standard Kubernetes type. A cluster-wide default lives at spec.replication.topologySpreadConstraints. The operator auto-injects hostname spread for Redis replication and Sentinel; user-set constraints are honored as-is.

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>.hoststring-PostgreSQL hostname
postgresqlProfiles.<name>.portinteger-PostgreSQL port
postgresqlProfiles.<name>.usernamestring-PostgreSQL username
postgresqlProfiles.<name>.tlsConfigobject-TLS configuration (see PostgreSQL TLS)

PostgreSQL Profile tlsConfig

FieldTypeDefaultDescription
sslmodeenumpreferdisable, allow, prefer, require, verify-ca, verify-full
insecureSkipVerifyboolfalseSkip TLS verification
keychainCaCertificates[]string-CA names from tlsKeychain
keychainClientCertificatestring-Client 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
replicasinteger1Web application replicas
httpPortinteger8080HTTP port
statusPortinteger-Deprecated. Health check port. Ignored since granian in nbe-core 4.5.x.
mediaStorageSizestring10GiMedia PVC size
scriptsStorageSizestring1GiScripts PVC size
migrationTimeoutstring1hMaximum time for the migration Job to run before Kubernetes terminates it. Accepts durations (1h, 30m) or bare seconds (3600).
migrationStatementTimeoutstring15mPer-statement timeout for index reconciliation. Prevents a single slow index creation from consuming the entire job deadline. Accepts durations or bare seconds.
storageClassNamestring-Storage class override
urls[]string-External URLs (configures ingress)
resources.cpuint200CPU request (millicores)
resources.memoryint750Memory request (MiB)
limits.cpuint1000CPU limit (millicores)
limits.memoryint1500Memory limit (MiB)
env[]EnvVar-Environment variables
yamlEnvstring-YAML string of env vars

spec.netbox.image

FieldTypeDefaultDescription
registrystringdocker.ioContainer registry
repositorystringnetboxcommunity/netboxImage repository
tagstringv4.5.10Image tag
digeststring-Image digest for pinning
pullPolicystringIfNotPresentPull policy

spec.netbox.diodePlugin

NetBox-side deadlines for outbound calls to Diode. Tune these when raising the cluster-wide ingress/gateway timeouts so the app layer does not cap the higher ingress bound.

FieldTypeDefaultDescription
authTimeoutstringruntime 500msTimeout for Hydra token introspection calls from the NetBox plugins.
grpcTimeoutstringruntime 5sTimeout for Diode gRPC calls from the NetBox plugins.

spec.netbox.worker (Required)

FieldTypeDefaultDescription
replicasintegerRequiredWorker 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
customPythonConfigstring-Inline custom Python config
customPythonConfigRefConfigMapKeySelector-ConfigMap ref for Python config
secretKeySecretKeySelectorAuto-generatedDjango secret key
emailPasswordSecretKeySelector-Email password
superuserobjectAuto-generatedSuperuser credentials (all 4 fields required if set)
pluginsobject{}Custom plugins config for installing wheelhouse packages (Python wheels). Specify a wheelhouse source (s3 or pvc).
postgresobjectderivedPostgreSQL connection config. Derived from spec.postgresql when not set.
redisobjectderivedRedis connection config. Derived from spec.redis when not set.
storage.s3.enabledboolfalseEnable S3 media storage
storage.s3.regionNamestringus-east-1AWS region name
storage.s3.bucketNamestring-S3 bucket name
storage.s3.endpointUrlstring-S3 endpoint URL (for non-AWS S3-compatible storage)
storage.s3.accessKeyIdSecretKeySelector-Secret reference for the S3 access key ID
storage.s3.secretAccessKeySecretKeySelector-Secret reference for the S3 secret access key
storage.s3.tlsConfigobject-S3 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[]string-CA names from tlsKeychain for server verification
tlsConfig.keychainClientCertificatestring-Client cert name from tlsKeychain for mTLS

spec.postgresql

Required. PostgreSQL database configuration.

FieldTypeDefaultDescription
externalboolfalseUse external PostgreSQL
instancesinteger0PGO replica count (internal only). 0 auto-scales to min(nodes, 3).
versionstring18PostgreSQL major version
storageSizestring4GiStorage per instance
storageClassNamestring-Storage class
registrystring-Image registry override
postgresqlProfilestring-Name of a profile from postgresqlProfiles for host, port, and TLS config
resources.cpuint-CPU request (millicores). Optional - when unset, no requests are applied
resources.memoryint-Memory request (MiB). Optional - when unset, no requests are applied
limits.cpuint-CPU limit (millicores). Optional - when unset, no limits are applied
limits.memoryint-Memory limit (MiB). Optional - when unset, no limits are applied

spec.redis

Required. Redis cache/queue configuration.

FieldTypeDefaultDescription
externalboolfalseUse external Redis
namestringredisInstance name
clusterSizeinteger0Redis replicas. 0 auto-scales based on node count (min(nodes, 3)) -- auto-scaling requires cluster-scoped RBAC. Sentinel is deployed automatically when the effective size is greater than 1.
sentinelMasterNamestring-Sentinel master group name. Required when sentinels is set. Identifies which master group the Sentinels are monitoring (e.g. netbox-redis).
sentinels[]object-Sentinel endpoints for external Redis HA. When set, NetBox uses Redis Sentinel for master discovery. Ignored for operator-managed Redis. See Redis Sentinels.
persistencebooltrueEnable persistence
requireAuthboolfalseRequire authentication
resources.cpuint-CPU request (millicores). Optional - when unset, no requests are applied
resources.memoryint-Memory request (MiB). Optional - when unset, no requests are applied
limits.cpuint-CPU limit (millicores). Optional - when unset, no limits are applied
limits.memoryint-Memory limit (MiB). Optional - when unset, no limits are applied
storageClassNamestring-Storage class
storageSizestring1GiStorage size for Redis PVCs (when persistence is enabled)

The following tuning fields apply only to operator-managed Redis (external: false):

FieldTypeDefaultDescription
aofEnabledbool-Enable AOF (append-only file) persistence. false avoids the OOM restart loop -- a restart does not replay the log to re-fill memory, and RDB snapshots still preserve the NetBox cache. true maximizes write durability. Omit to leave the Redis server default unchanged.
maxMemoryPercentinteger-Cap Redis memory at N% (0-100) of limits.memory, emitted as a maxmemory directive. No-op when limits.memory is unset.
maxMemoryPolicyenum-Key eviction policy applied when maxmemory is reached: noeviction, allkeys-lru, volatile-lru, allkeys-random, volatile-random, volatile-ttl, allkeys-lfu, volatile-lfu. Without a policy, Redis defaults to noeviction (reject writes).
dynamicConfig[]string-Extra Redis config directives appended to the managed ConfigMap. Applied on the next pod roll, not live. Prefer the typed fields above where they cover the need.
additionalConfigstring-Raw Redis config directives appended verbatim after the typed fields (Redis uses the last occurrence, so raw directives take precedence).

spec.redis.sentinels[]

Each entry is a Redis Sentinel endpoint address.

FieldTypeDefaultDescription
hoststringRequiredSentinel hostname
portinteger26379Sentinel port number

spec.redis.tlsConfig

FieldTypeDefaultDescription
insecureSkipVerifyboolfalseSkip TLS verification
keychainCaCertificates[]string-CA names from tlsKeychain
keychainClientCertificatestring-Client cert name from tlsKeychain

spec.copilot

Optional. Private Copilot AI assistant backend. Requires a Private Copilot license entitlement and an LLM API key secret. Disabled by default.

copilot:
enabled: true
llmProvider: anthropic
llmModel: anthropic/claude-sonnet-4-6
llmApiKeySecret: copilot-llm-api-key
llmApiKeySecretKey: apiKey
FieldTypeDefaultDescription
enabledboolfalseEnable the Copilot backend and activate the netbox_copilot plugin in NetBox
replicasinteger1Copilot backend replicas
llmProviderenumanthropicanthropic or bedrock
llmModelstringanthropic/claude-sonnet-4-6Provider-prefixed model identifier (e.g. anthropic/claude-sonnet-4-6, bedrock/us.anthropic.claude-sonnet-4-6)
llmApiKeySecretstringcopilot-llm-api-keyKubernetes Secret holding the LLM API key (must exist in the same namespace)
llmApiKeySecretKeystringapiKeyKey within llmApiKeySecret
llmMaxStepsinteger20Maximum LLM reasoning steps per conversation turn
awsRegionstringus-east-2AWS region for Bedrock. Sets AWS_DEFAULT_REGION in the Copilot container.
awsCredentialsSecretstring-Optional Secret with aws_access_key_id and aws_secret_access_key for Bedrock. Omit to use ambient credentials (IRSA, instance profile).
databaseUserstringcopilotPostgreSQL user for the Copilot database
redisDbinteger2Redis database number (NetBox uses 0, Diode uses 1)
netboxAuthCookieNamestringsessionidNetBox session cookie name used for authentication
netboxAuthCacheTtlinteger60TTL in seconds for caching NetBox auth session validation
netboxAuthApiTimeoutinteger5Timeout in seconds for NetBox auth API calls
resources.cpuint100CPU request (millicores)
resources.memoryint256Memory request (MiB)
limits.cpuint1000CPU limit (millicores)
limits.memoryint1024Memory limit (MiB)

spec.copilot.postgres

Optional external PostgreSQL connection for Copilot. When omitted, Copilot uses the PGO-managed secret {cluster-name}-postgres-pguser-copilot.

copilot:
postgres:
databaseUrl:
name: copilot-postgres-url
key: DATABASE_URL
sslMode: verify-full
keychainCaCertificates:
- copilot-db-ca
FieldTypeDefaultDescription
databaseUrl.namestringRequiredSecret name containing the full DATABASE_URL URI
databaseUrl.keystringRequiredKey within the secret (e.g. DATABASE_URL)
sslModeenum-disable, allow, prefer, require, verify-ca, verify-full
keychainCaCertificates[]string-CA names from tlsKeychain for verifying the Copilot PostgreSQL server. Required when sslMode is verify-ca or verify-full.

spec.diode

Optional. Diode data ingestion pipeline.

FieldTypeDefaultDescription
enabledbooltrueEnable Diode
reconciler.replicasinteger1Reconciler replicas
ingester.replicasinteger1Ingester replicas
auth.replicasinteger1Auth replicas
hydra.replicasinteger1Hydra replicas
hydra.autoMigratebooltrueAuto-run Hydra DB migrations
hydra.postgresqlProfilestring-PostgreSQL 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
autoApplyChangesetsbooltrueAuto-apply change sets to NetBox. The operator sets this to false at runtime when Assurance is licensed; the schema default is true.
logLevelenumINFOINFO, DEBUG, WARN, ERROR
databaseNamestringdiodePostgreSQL database
databaseUserstringdiodePostgreSQL user
migrationEnabledbooltrueRun DB migrations
redisDbinteger0Redis database number
redisStreamDbinteger1Redis stream database
autoApplyProcessorConcurrencyinteger1Number of concurrent auto-apply processors (1-255).
ingestionLogProcessorConcurrencyinteger4Number of concurrent ingestion-log processors (1-255).
rateLimitRpsinteger20Rate limit (req/sec)
rateLimitBurstinteger1Burst allowance for the reconciler rate limiter
rateLimitNetboxRpsinteger20Rate limit for requests against NetBox (req/sec)
rateLimitNetboxBurstinteger1Burst allowance for requests against NetBox
netboxClientIdstringdiode-to-netboxOAuth2 client ID the reconciler uses against NetBox
pluginApiBaseUrlstring-NetBox Diode plugin API base URL. Auto-generated from cluster name and namespace when unset.
sentryDsnstring-Sentry DSN for error tracking
telemetryConfigobject-OpenTelemetry config (see Telemetry config)
postgres.postgresqlProfilestring-PostgreSQL profile for Diode's database connection

spec.diode.config.ingester and spec.diode.config.auth

The ingester and auth components share the same logging, Sentry, and telemetry fields as the reconciler. The ingester additionally has its own Redis stream database.

FieldTypeDefaultDescription
logLevelenumINFOINFO, DEBUG, WARN, ERROR
sentryDsnstring-Sentry DSN for error tracking
telemetryConfigobject-OpenTelemetry config (see Telemetry config)
redisStreamDb (ingester only)integer1Redis stream database number
redisMemoryHighWatermarkPct (ingester only)integer90Redis used_memory/maxmemory percentage at which the ingester rejects ingest with ResourceExhausted (0-100; 0 disables the check). Only meaningful when Redis has a maxmemory cap -- set redis.maxMemoryPercent.

Diode telemetryConfig

OpenTelemetry configuration shared by the reconciler, ingester, and auth components.

FieldTypeDefaultDescription
metricsEnabledboolfalseEnable the Prometheus metrics endpoint
metricsExporterenumprometheusprometheus, otlp, console, none
metricsPortinteger-Port for the metrics endpoint (component-specific default)
traceExporterenumnoneTrace exporter backend
environmentstring-Deployment environment name. When unset, Diode uses its built-in default.

spec.tlsKeychain

Centralized TLS certificate management.

spec.tlsKeychain.caCertificateSecrets[]

FieldTypeDefaultDescription
namestringRequiredLogical name (referenced in tlsConfig)
secretstring-Kubernetes secret name. When omitted, defaults to the value of name at runtime.
keystringca.crtKey within the secret

spec.tlsKeychain.clientCertificateSecrets[]

FieldTypeDefaultDescription
namestringRequiredLogical name
secretstring-Kubernetes secret name. When omitted, defaults to the value of name at runtime.
certKeystringtls.crtCertificate key
privateKeystringtls.keyPrivate key

spec.ingress

Cluster-wide Ingress configuration. When omitted, the operator generates Ingress objects with the default nginx class and no extra annotations.

ingress:
className: nginx
timeouts:
connect: 10s
read: 60s
send: 60s
tls:
- hosts: [netbox.example.com]
secretName: netbox-tls
FieldTypeDefaultDescription
enabledbooltrueWhether the operator creates Ingress objects. When false, existing Ingress objects are pruned by orphan cleanup.
classNamestringnginxKubernetes Ingress class name. Maps to spec.ingressClassName on every generated Ingress.
annotationsmap[string]string-Extra annotations merged onto every Ingress object. Values here override the hardcoded nginx-specific defaults when keys collide.
tls[]IngressTLS-TLS termination entries. Each entry maps directly to a Kubernetes IngressTLS object. All unique hosts across entries are used to create IngressRule entries.
timeouts.connectstring-Time allowed to establish a TCP connection to the upstream. Kubernetes-style duration.
timeouts.readstring-Time between successive reads from the upstream response. Kubernetes-style duration.
timeouts.sendstring-Time between successive writes to the upstream request. Kubernetes-style duration.
note

Proxy timeouts are translated to nginx annotations. Non-nginx Ingress classes log a warning and leave timeouts at the controller defaults. Per-service overrides on spec.copilot.timeouts.ingress, spec.diode.timeouts.http.ingress, and spec.diode.timeouts.grpc.ingress field-merge with the cluster-wide defaults.

spec.gateway

Optional Gateway API configuration. When omitted or enabled: false, no Gateway API resources are created. Can coexist with Ingress -- both can be enabled simultaneously.

gateway:
enabled: true
className: istio
listeners:
- name: http
port: 80
protocol: HTTP
FieldTypeDefaultDescription
enabledboolfalseWhether the operator creates Gateway API resources. Opt-in. When true, the operator creates a Gateway plus the associated HTTPRoute and GRPCRoute objects.
classNamestringistioGatewayClass name for the Gateway resource. Common values: istio, envoy, cilium.
annotationsmap[string]string-Extra annotations merged onto all Gateway API resources.
listeners[]GatewayListener-Gateway listener definitions. Each entry maps to a spec.listeners[] entry on the upstream Gateway type. See Gateway listeners.
timeoutsobject-Cluster-wide HTTPRoute timeout defaults. Per-service overrides on spec.copilot.timeouts.gateway and spec.diode.timeouts.http.gateway field-merge with these defaults.

spec.gateway.listeners[]

Each entry maps to a spec.listeners[] entry on the upstream Gateway API Gateway type.

FieldTypeDefaultDescription
namestringRequiredListener name, unique within the Gateway
portintegerRequiredPort the listener binds to
protocolstringRequiredListener protocol (e.g. HTTP, HTTPS)
hostnamestring-Virtual hostname to match for protocol types that define this concept
tlsobject-TLS configuration for the listener
allowedRoutesobject-Types of routes that may attach to the listener and the trusted namespaces they may come from

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

spec.replicatedApp

Replicated-specific tuning. These knobs only apply when NetBox Enterprise is installed through Replicated (Embedded Cluster or KOTS).

spec.replicatedApp.licenseFallback

Retry budget for fetching the license from the Replicated SDK at startup. When the SDK is unreachable, the operator retries within this budget before proceeding with the default Community license.

FieldTypeDefaultDescription
retryIntervalstringruntime 5sDelay between retry attempts. Accepts Kubernetes-style durations (5s) or bare seconds (5).
totalTimeoutstringruntime 30sTotal time budget for the retry loop. Once exhausted, reconcile proceeds with the default Community license. Accepts durations (30s, 1m) or bare seconds (30).

Next Steps

Related Topics