Skip to content

Instantly share code, notes, and snippets.

@mrl5
Last active June 29, 2026 16:07
Show Gist options
  • Select an option

  • Save mrl5/413727cde78afee1e7dbdc594788f2f3 to your computer and use it in GitHub Desktop.

Select an option

Save mrl5/413727cde78afee1e7dbdc594788f2f3 to your computer and use it in GitHub Desktop.
k3s + netbird + cilium
read NETBIRD_SERVER_IP
NETBIRD_IFACE=wt0
NETBIRD_CIDR=100.123.0.0/16
DEFAULT_NO_PROXY='127.0.0.0/8,10.0.0.0/8,172.16.0.0/12,192.168.0.0/16'
curl -sfL https://get.k3s.io |
NO_PROXY="127.0.0.0/8,10.0.0.0/8,172.16.0.0/12,192.168.0.0/16,${NETBIRD_CIDR}" \
INSTALL_K3S_EXEC="server --node-ip ${NETBIRD_SERVER_IP} --node-external-ip ${NETBIRD_SERVER_IP} --flannel-backend=none --disable-network-policy --disable-kube-proxy --disable=traefik" \
sh -
export KUBECONFIG=/etc/rancher/k3s/k3s.yaml
CILIUM_CLI_VERSION=$(curl -s https://raw.githubusercontent.com/cilium/cilium-cli/main/stable.txt)
CLI_ARCH=amd64
if [ "$(uname -m)" = "aarch64" ]; then CLI_ARCH=arm64; fi
curl -L --fail --remote-name-all https://github.com/cilium/cilium-cli/releases/download/${CILIUM_CLI_VERSION}/cilium-linux-${CLI_ARCH}.tar.gz{,.sha256sum}
sha256sum --check cilium-linux-${CLI_ARCH}.tar.gz.sha256sum
sudo tar xzvfC cilium-linux-${CLI_ARCH}.tar.gz /usr/local/bin
rm cilium-linux-${CLI_ARCH}.tar.gz{,.sha256sum}
sudo KUBECONFIG=/etc/rancher/k3s/k3s.yaml cilium install \
# --version 1.18.5 \
--set k8sServiceHost=$NETBIRD_SERVER_IP \
--set k8sServicePort=6443 \
--set kubeProxyReplacement=true \
--set ipam.operator.clusterPoolIPv4PodCIDRList=10.42.0.0/16 \
--set operator.replicas=1
sudo KUBECONFIG=/etc/rancher/k3s/k3s.yaml cilium status --wait
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment