Skip to content

Instantly share code, notes, and snippets.

@flrichar
Last active August 22, 2023 18:41
Show Gist options
  • Save flrichar/0c60f434ca8825e7b6c9e1412d634ab6 to your computer and use it in GitHub Desktop.
Save flrichar/0c60f434ca8825e7b6c9e1412d634ab6 to your computer and use it in GitHub Desktop.
K3s Config Base, Single Node, Cilium 1.13 & no Kube-Proxy
write-kubeconfig-mode: "0644"
tls-san:
- "*.funnest-fqdn.com"
##kube-proxy-arg:
## - "proxy-mode=ipvs"
kubelet-arg:
- "log-flush-frequency=10s"
- "container-log-max-files=4"
- "container-log-max-size=300Mi"
cluster-cidr: 10.41.0.0/17
service-cidr: 10.41.128.0/17
cluster-dns: 10.41.128.10
flannel-backend: "none"
disable-network-policy: true
disable-cloud-controller: true
disable-kube-proxy: true
## example of changing cidr for k3s... this is server-config
## 2023_0822 updated for cilium, install with cilium-cli & HelmChartConfig
## minor changes for rke2, check with the server opts docs
@flrichar
Copy link
Author

flrichar commented Aug 22, 2023

sample HelmChartConfig for Cilium

---
apiVersion: helm.cattle.io/v1
kind: HelmChartConfig
metadata:
  name: rke2-cilium
  namespace: kube-system
spec:
  valuesContent: |-
    kubeProxyReplacement: strict
    k8sServiceHost: 127.0.0.1
    k8sServicePort: 6443
    cni:
      chainingMode: "none"
    bgpControlPlane:
      enabled: true
    operator:
      replicas: 1

@flrichar
Copy link
Author

flrichar commented Aug 22, 2023

example of installing cilium with the cilium-cli

## cat get-cilium113.sh 

#!/bin/bash

##CILIUM_CLI_VERSION=$(curl -s https://raw.githubusercontent.com/cilium/cilium-cli/master/stable.txt)
CILIUM_CLI_VERSION=v0.14.8
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}

## cat install-cilium.sh

#!/bin/bash
cilium install --config 'cluster-pool-ipv4-cidr=10.41.0.0/17,cluster-pool-ipv4-mask-size=23'

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment