From 14bbf62d2f926e9b01fee5bb0130b1c74147a642 Mon Sep 17 00:00:00 2001 From: bcmmbaga Date: Wed, 18 Feb 2026 13:52:15 +0300 Subject: [PATCH] Add init sidecar mode for k8s operator Signed-off-by: bcmmbaga --- .../manage/integrations/kubernetes/index.mdx | 29 +++++++++++++++++++ 1 file changed, 29 insertions(+) diff --git a/src/pages/manage/integrations/kubernetes/index.mdx b/src/pages/manage/integrations/kubernetes/index.mdx index 2618685cc..bc3a127bf 100644 --- a/src/pages/manage/integrations/kubernetes/index.mdx +++ b/src/pages/manage/integrations/kubernetes/index.mdx @@ -325,6 +325,35 @@ spec: ... ``` +### Init Sidecar Mode +By default, the NetBird container is injected as a regular sidecar container. For workloads like Jobs and CronJobs where the pod +should terminate after the main container completes, you can use init sidecar mode. This injects NetBird as an init container +with `restartPolicy: Always`. + +To enable init sidecar mode, add the following annotation: + +```yaml +netbird.io/init-sidecar: "true" +``` + +Below is an example of a Job using init sidecar mode: + +```yaml +kind: Job +... +spec: +... + template: + metadata: + annotations: + netbird.io/setup-key: app-setup-key # Must match the name of an NBSetupKey object in the same namespace + netbird.io/init-sidecar: "true" +... + spec: + containers: +... +``` + ### Using Extra Labels to Access Multiple Pods Using the Same Name Starting with `v0.27.0`, NetBird supports extra DNS labels, allowing you to define extended DNS names for peers. This enables grouping peers under a shared DNS name and distributing traffic using DNS round-robin load balancing.