Skip to main content
While NetBird doesn’t provide official Helm charts yet, you can deploy it on Kubernetes using custom manifests based on the Docker Compose configuration.
NetBird is primarily designed for Docker Compose deployments. Kubernetes support is community-driven. For production Kubernetes deployments, consider using NetBird Cloud or contributing Helm charts to the project.

Prerequisites

  • Kubernetes cluster (v1.20+)
  • kubectl configured with cluster access
  • Ingress controller (nginx, Traefik, or similar)
  • Cert-manager for automatic TLS (recommended)
  • Storage class for persistent volumes

Architecture on Kubernetes

A Kubernetes deployment of NetBird consists of:
  • NetBird Server Deployment - Combined server (management, signal, relay, STUN)
  • Dashboard Deployment - Web UI
  • ConfigMaps - For config.yaml and dashboard environment
  • Secrets - For encryption keys and OAuth secrets
  • Services - ClusterIP for internal communication, LoadBalancer/NodePort for STUN
  • Ingress - HTTPS routing to dashboard and server
  • PersistentVolumeClaim - For SQLite database storage

Namespace and ConfigMap

Create Namespace

ConfigMap for Server Configuration

Create a ConfigMap with the combined server configuration:
Replace netbird.example.com with your actual domain. Generate secure secrets using openssl rand -base64 32.

ConfigMap for Dashboard

Secrets

Create secrets for sensitive data:
Store these secrets securely in your secret management system (e.g., Sealed Secrets, External Secrets Operator, or HashiCorp Vault).

Persistent Storage

NetBird Server Deployment

With SQLite, you cannot run multiple replicas. For high availability, configure PostgreSQL or MySQL as the database backend and set replicas: 2+.

Dashboard Deployment

Services

NetBird Server Service

Dashboard Service

Ingress Configuration

With Nginx Ingress Controller

For gRPC to work properly, ensure your ingress controller supports HTTP/2 and has appropriate timeout settings.

Cert-Manager ClusterIssuer

For automatic TLS certificates:

Deployment

Apply all manifests:

Verification

Scaling Considerations

Using SQLite (Default)

  • Cannot scale beyond 1 replica
  • Suitable for small deployments (less than 100 peers)
  • Single point of failure

Using PostgreSQL/MySQL

For production Kubernetes deployments:
  1. Deploy PostgreSQL or MySQL in the cluster
  2. Update config.yaml:
  3. Add environment variable to deployment:
  4. Scale to multiple replicas:

Monitoring

Prometheus Integration

NetBird exposes metrics on port 9090:
Configure ServiceMonitor for Prometheus Operator:

Troubleshooting

Pods Not Starting

Ingress Issues

gRPC Connection Failures

Ensure ingress controller supports:
  • HTTP/2
  • gRPC protocol
  • Extended timeouts for long-lived connections

STUN Port Not Accessible

Community Resources

If you develop Helm charts or improved Kubernetes manifests, consider contributing them to the NetBird project!

Next Steps

Docker Compose

Simpler alternative for non-Kubernetes environments

NetBird Cloud

Managed NetBird without infrastructure management

Access Control

Configure network policies after deployment

Monitoring

Set up observability for your deployment