Rancher Desktop으로 Cilium 설치하기
Rancher Desktop으로 Cilium 설치하기
이 가이드는 Mac, Windows, Linux용 오픈소스 데스크톱 애플리케이션인 Rancher Desktop에 Cilium을 설치하는 방법을 안내해요.
본문
이 가이드는 Mac, Windows, Linux용 오픈소스 데스크톱 애플리케이션인 Rancher Desktop에 Cilium을 설치하는 과정을 안내해요.
Rancher Desktop 구성하기
Rancher Desktop은 YAML 구성 파일로 설정해요. 기본 CNI를 비활성화하고 Cilium으로 교체하려면 이 단계가 필요해요.
다음으로 Rancher Desktop을 containerd로 시작하고 override.yaml을 생성해요.
env:
# needed for cilium
INSTALL_K3S_EXEC: '--flannel-backend=none --disable-network-policy'
provision:
# needs root to mount
- mode: system
script: |
#!/bin/sh
set -e
# needed for cilium
mount bpffs -t bpf /sys/fs/bpf
mount --make-shared /sys/fs/bpf
mkdir -p /run/cilium/cgroupv2
mount -t cgroup2 none /run/cilium/cgroupv2
mount --make-shared /run/cilium/cgroupv2/
파일을 만든 뒤 Rancher Desktop의 lima/_config 디렉터리로 옮겨요.
cp override.yaml ~/.local/share/rancher-desktop/lima/_config/override.yaml
cp override.yaml ~/Library/Application\ Support/rancher-desktop/lima/_config/override.yaml
마지막으로 Rancher Desktop UI를 열고 Troubleshooting 패널로 가서 "Reset Kubernetes"를 클릭해요.
몇 분 후 Rancher Desktop이 Cilium 설치 준비 상태로 다시 시작될 거예요.
Cilium 설치하기
최신 버전의 Cilium CLI를 설치해요. Cilium CLI는 Cilium 설치, 설치 상태 점검, 다양한 기능(예: clustermesh, Hubble) 활성화/비활성화에 사용할 수 있어요.
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}
CILIUM_CLI_VERSION=$(curl -s https://raw.githubusercontent.com/cilium/cilium-cli/main/stable.txt)
CLI_ARCH=amd64
if [ "$(uname -m)" = "arm64" ]; then CLI_ARCH=arm64; fi
curl -L --fail --remote-name-all https://github.com/cilium/cilium-cli/releases/download/${CILIUM_CLI_VERSION}/cilium-darwin-${CLI_ARCH}.tar.gz{,.sha256sum}
shasum -a 256 -c cilium-darwin-${CLI_ARCH}.tar.gz.sha256sum
sudo tar xzvfC cilium-darwin-${CLI_ARCH}.tar.gz /usr/local/bin
rm cilium-darwin-${CLI_ARCH}.tar.gz{,.sha256sum}
전체 releases 페이지를 참고하세요.
다음을 실행해 Cilium을 설치해요.
cilium install 1.20.2
설치 검증하기
Cilium이 제대로 설치됐는지 확인하려면 다음을 실행해요.
$ cilium status --wait
/¯\
/¯\__/¯\ Cilium: OK
\__/¯\__/ Operator: OK
/¯\__/¯\ Hubble: disabled
\__/¯\__/ ClusterMesh: disabled
\__/
DaemonSet cilium Desired: 2, Ready: 2/2, Available: 2/2
Deployment cilium-operator Desired: 2, Ready: 2/2, Available: 2/2
Containers: cilium-operator Running: 2
cilium Running: 2
Image versions cilium quay.io/cilium/cilium:v1.9.5: 2
cilium-operator quay.io/cilium/operator-generic:v1.9.5: 2
클러스터가 올바른 네트워크 연결을 갖췄는지 확인하려면 다음 명령을 실행해요.
$ cilium connectivity test
ℹ️ Monitor aggregation detected, will skip some flow validation steps
✨ [k8s-cluster] Creating namespace for connectivity check...
(...)
---------------------------------------------------------------------------------------------------------------------
📋 Test Report
---------------------------------------------------------------------------------------------------------------------
✅ 69/69 tests successful (0 warnings)
참고
연결성 테스트는 Pod 중 하나에 열린 파일이 너무 많아 배포에 실패할 수 있어요. 이런 오류가 보이면 호스트 머신의
inotify리소스 한도를 늘리세요 (Pod errors due to "too many open files").
축하해요! 이제 Cilium이 동작하는 완전한 Kubernetes 클러스터가 갖춰졌어요. 🎉
다음 단계
- Setting up Hubble Observability
- Inspecting Network Flows with the CLI
- Service Map & Hubble UI
- Identity-Aware and HTTP-Aware Policy Enforcement
- Setting up Cluster Mesh