> ## Documentation Index
> Fetch the complete documentation index at: https://docs.siderolabs.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Deploy kube-router CNI

> In this guide you will learn how to set up kube-router CNI on Talos.

[kube-router](https://www.kube-router.io/) is a turnkey CNI (Container Network Interface) solution for Kubernetes networking that provides pod networking, network policy enforcement, and service proxy using Linux kernel technologies (BGP, IPVS, IPTables, and eBPF).

## Install kube-router CNI

When generating the machine config for a node, set the CNI to none and disable the default kube-proxy since kube-router replaces it.

> [tab] Talos v1.14+
>
> For Talos v1.14 and later, delete the default CNI and disable kube-proxy:
>
> ```bash theme={null}
> cat <<'EOF' > patch.yaml
> apiVersion: v1alpha1
> kind: KubeFlannelCNIConfig
> $patch: delete
> ---
> apiVersion: v1alpha1
> kind: KubeProxyConfig
> enabled: false
> EOF
> ```

> [tab] Talos \< v1.14
>
> On Talos versions earlier than v1.14, set the CNI to `none` and disable kube-proxy:
>
> ```bash theme={null}
> cat <<'EOF' > patch.yaml
> cluster:
>   network:
>     cni:
>       name: none
>   proxy:
>     disabled: true
> EOF
> ```

Generate the machine config with the patch applied to the control plane:

```bash theme={null}
talosctl gen config \
  <cluster-name> https://<cluster-endpoint>:6443 \
  --config-patch-control-plane @patch.yaml
```

If you want to use kube-router alongside kube-proxy instead of replacing it, omit `proxy.disabled: true` from the patch and set `kubeRouter.run_router=--run-service-proxy=false` in the kube-router DaemonSet arguments.

## Installation

Choose the tab that matches how you manage your cluster.

> [tab] Manifest install
>
> kube-router can replace kube-proxy entirely, or run alongside it. Choose the tab that matches how you want to run it.
>
> > [tab] With kube-proxy
> >
> > 1. Create a patch file that disables the default CNI. This keeps kube-proxy running, and uses kube-router for pod networking and network policies only:
> >
> >    ```bash theme={null}
> >    cat <<EOF > patch.yaml
> >    cluster:
> >      network:
> >        cni:
> >          name: none
> >    EOF
> >    ```
> >
> > 2. Replace `<CLUSTER_NAME>` with a name for your cluster and `<CLUSTER_ENDPOINT>` with your control plane endpoint, then generate the machine config:
> >
> >    ```bash theme={null}
> >    talosctl gen config \
> >        <CLUSTER_NAME> <CLUSTER_ENDPOINT> \
> >        --config-patch @patch.yaml
> >    ```
> >
> > > [!NOTE]
> > >
> > > After applying the machine config and bootstrapping, Talos will appear to hang at phase 18/19 with the message `retrying error: node not ready`. This is expected — nodes are only marked ready once a CNI is running. You have about 10 minutes to apply kube-router before the node reboots to retry.
> >
> > 3. During this window, deploy kube-router:
> >
> >    ```bash theme={null}
> >    kubectl apply -f https://raw.githubusercontent.com/cloudnativelabs/kube-router/master/daemonset/kubeadm-kuberouter.yaml
> >    ```
> >
> >    After kube-router is installed, the boot process continues and completes.
>
> > [tab] Without kube-proxy
> >
> > 1. Create a patch file that disables the default CNI and kube-proxy — kube-router replaces both:
> >
> >    ```bash theme={null}
> >    cat <<EOF > patch.yaml
> >    cluster:
> >      network:
> >        cni:
> >          name: none
> >      proxy:
> >        disabled: true
> >    EOF
> >    ```
> >
> > 2. Replace `<CLUSTER_NAME>` with a name for your cluster and `<CLUSTER_ENDPOINT>` with your control plane endpoint, then generate the machine config:
> >
> >    ```bash theme={null}
> >    talosctl gen config \
> >        <CLUSTER_NAME> <CLUSTER_ENDPOINT> \
> >        --config-patch @patch.yaml
> >    ```
> >
> > > [!NOTE]
> > >
> > > After applying the machine config and bootstrapping, Talos will appear to hang at phase 18/19 with the message `retrying error: node not ready`. This is expected — nodes are only marked ready once a CNI is running. You have about 10 minutes to apply kube-router before the node reboots to retry.
> >
> > 3. During this window, deploy kube-router with all features (pod networking, network policies, and service proxy):
> >
> >    ```bash theme={null}
> >    kubectl apply -f https://raw.githubusercontent.com/cloudnativelabs/kube-router/master/daemonset/kubeadm-kuberouter-all-features.yaml
> >    ```
> >
> >    After kube-router is installed, the boot process continues and completes.

> [tab] Omni
>
> If you are using [Omni](https://www.siderolabs.com/platform/saas-for-kubernetes/), deploy kube-router using the [manifest sync](https://docs.siderolabs.com/omni/cluster-management/sync-kubernetes-manifests.md) feature.
>
> kube-router can replace kube-proxy entirely, or run alongside it. Choose the tab that matches how you want to run it.
>
> > [tab] With kube-proxy
> >
> > 1. Download the kube-router manifest:
> >
> >    ```bash theme={null}
> >    curl -Lo kube-router.yaml https://raw.githubusercontent.com/cloudnativelabs/kube-router/master/daemonset/kubeadm-kuberouter.yaml
> >    ```
> >
> > 2. Reference the manifest in your Omni cluster template using the `file` field. The template's `patches` block disables the default CNI and leaves kube-proxy running:
> >
> > kind: Cluster
> > name: my-cluster
> > kubernetes:
> > &#x20; version: 1.37.1
> > &#x20; manifests:
> > &#x20;   \- name: kube-router
> > &#x20;     file: kube-router.yaml
> > &#x20;     mode: one-time
> > patches:
> > &#x20; \- name: disable-default-cni
> > &#x20;   inline:
> > &#x20;     cluster:
> > &#x20;       network:
> > &#x20;         cni:
> > &#x20;           name: none
> > ...
> > \# Include machines for template
> >
> > 3. Apply the cluster template:
> >
> >    ```bash theme={null}
> >    omnictl cluster template sync --file cluster-template.yaml
> >    ```
> >
> >    Omni waits until the Kubernetes API is available and the cluster is healthy before applying the kube-router manifest. See [Sync Kubernetes manifests](https://docs.siderolabs.com/omni/cluster-management/sync-kubernetes-manifests.md) for more on manifest sync modes and status monitoring.
>
> > [tab] Without kube-proxy
> >
> > 1. Download the kube-router manifest:
> >
> >    ```bash theme={null}
> >    curl -Lo kube-router.yaml https://raw.githubusercontent.com/cloudnativelabs/kube-router/master/daemonset/kubeadm-kuberouter-all-features.yaml
> >    ```
> >
> > 2. Reference the manifest in your Omni cluster template using the `file` field. The template's `patches` block disables the default CNI and kube-proxy:
> >
> > **For Talos v1.14 and later**:
> >
> > kind: Cluster
> > name: my-cluster
> > kubernetes:
> > &#x20; version: 1.37.1
> > &#x20; manifests:
> > &#x20;   \- name: kube-router
> > &#x20;     file: kube-router.yaml
> > &#x20;     mode: one-time
> > patches:
> > &#x20; \- name: disable-default-cni
> > &#x20;   inline:
> > &#x20;     apiVersion: v1alpha1
> > &#x20;     kind: KubeFlannelCNIConfig
> > &#x20;     \$patch: delete
> > &#x20; \- name: disable-kube-proxy
> > &#x20;   inline:
> > &#x20;     apiVersion: v1alpha1
> > &#x20;     kind: KubeProxyConfig
> > &#x20;     enabled: false
> > ...
> > \# Include machines for template
> >
> > **On Talos versions earlier than v1.14**:
> >
> > kind: Cluster
> > name: my-cluster
> > kubernetes:
> > &#x20; version: 1.37.1
> > &#x20; manifests:
> > &#x20;   \- name: kube-router
> > &#x20;     file: kube-router.yaml
> > &#x20;     mode: one-time
> > patches:
> > &#x20; \- name: disable-default-cni-and-proxy
> > &#x20;   inline:
> > &#x20;     cluster:
> > &#x20;       network:
> > &#x20;         cni:
> > &#x20;           name: none
> > &#x20;       proxy:
> > &#x20;         disabled: true
> > ...
> > \# Include machines for template
> >
> > 3. Apply the cluster template:
> >
> >    ```bash theme={null}
> >    omnictl cluster template sync --file cluster-template.yaml
> >    ```
> >
> >    Omni waits until the Kubernetes API is available and the cluster is healthy before applying the kube-router manifest. See [Sync Kubernetes manifests](https://docs.siderolabs.com/omni/cluster-management/sync-kubernetes-manifests.md) for more on manifest sync modes and status monitoring.

## Cleanup of kube-proxy

If you deployed kube-router as a replacement for kube-proxy and kube-proxy was previously running, clean up the iptables rules left behind:

```bash theme={null}
kubectl -n kube-system delete ds kube-proxy
kubectl -n kube-system delete cm kube-proxy
```

Refer to the [kube-router user guide](https://www.kube-router.io/docs/user-guide/) for more configuration options.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.