kubernetes-bootstrapping/02-cni-cilium/README.md

40 lines
1.1 KiB
Markdown

# 02 | CNI Cilium
Only install one CNI, do not install Flannel if using Cilium. Cilium brings network policy capabilities and uses eBPF technology to provide increased performance.
Reference: https://docs.cilium.io/en/stable/gettingstarted/k8s-install-default/
First we must install the cilium CLI binary, as root:
```bash
sudo su -
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}
```
Then we can use it to install cilium into Kubernetes:
```bash
cilium install --version 1.14.5
```
Validate the install:
```bash
cilium status --wait
```
The following test can be performed, but it won't work until worker nodes are joined.
```bash
cilium connectivity test
```