Last active
November 17, 2023 14:36
-
-
Save bschimke95/69bf88e3e1fc9b8cb396f4646876eaf8 to your computer and use it in GitHub Desktop.
Cilium with ingress Controller
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Configure cluster CIDR | |
IPv4_CLUSTER_CIDR="10.1.0.0/16" | |
IPv6_CLUSTER_CIDR="" | |
# Require cgroup2 to be mounted | |
cgroup_hostroot="$(mount -t cgroup2 | head -1 | cut -d' ' -f3)" | |
if [ -z "$cgroup_hostroot" ]; then | |
echo "cgroup2 mount not found, fail" | |
exit 1 | |
fi | |
# Require bpf to be mounted | |
bpf_root="$(mount -t bpf | head -1 | cut -d' ' -f3)" | |
if [ -z "$bpf_root" ]; then | |
echo "/sys/fs/bpf not found, fail" | |
exit 1 | |
else | |
sudo mount -t bpf bpf /sys/fs/bpf | |
bpf_root=/sys/fs/bpf | |
fi | |
mkdir -p ~/.kube | |
sudo k8s config > ~/.kube/config | |
/snap/k8s/current/bin/helm install cilium -n kube-system cilium \ | |
--repo https://helm.cilium.io --version v1.14.3 \ | |
--set cni.confPath=/etc/cni/net.d \ | |
--set cni.binPath=/opt/cni/bin \ | |
--set daemon.runPath=/var/run/cilium \ | |
--set operator.replicas=1 \ | |
--set ipam.operator.clusterPoolIPv4PodCIDRList="${IPv4_CLUSTER_CIDR}" \ | |
--set ipam.operator.clusterPoolIPv6PodCIDRList="${IPv6_CLUSTER_CIDR}" \ | |
--set nodePort.enabled=true \ | |
--set bpf.autoMount.enabled=false \ | |
--set bpf.root="${bpf_root}" \ | |
--set cgroup.autoMount.enabled=false \ | |
--set cgroup.hostRoot="${cgroup_hostroot}" \ | |
--set l2announcements.enabled=true \ | |
--set ingressController.enabled=true \ | |
--set ingressController.loadbalancerMode=dedicated |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Install cilium cli with
then verify that ingress is set with