Install Cilium 1.9 with k3s 1.19 on CentOS 8


Install a single node k3s kubernetes platform on CentOS 8.

Prerequisites

Clean and up to date CentOS 8 system.

Get Helm v3

Download from: https://github.com/helm/helm/releases  . Extract and copy to /usr/local/bin/helm

Add helm repo:

helm repo add cilium https://helm.cilium.io/

Install k3s

Without kube-proxy, without flannel


curl -fsL https://get.k3s.io | INSTALL_K3S_EXEC='--no-flannel --flannel-backend=none --disable-kube-proxy' sh -c

The kubeconfig file will be saved to /etc/rancher/k3s/k3s.yaml

Install Cilium

... with Hubble UI, kube-proxy replacement, host services, nodePort features.

Replace $HOST_IP with the ip you see k3s kubectl get nodes -owide .

export KUBECONFIG=/etc/rancher/k3s/k3s.yaml

helm install cilium cilium/cilium \
  --version 1.9.0 \
  --namespace kube-system \
  --set kubeProxyReplacement=strict \
  --set k8sServiceHost=$HOST_IP \
  --set k8sServicePort=6443 \
  --set hostServices.enabled=true \
  --set operator.replicas=1 \
  --set hubble.ui.enabled=true \
  --set hubble.relay.enabled=true \
  --set nodeinit.enabled=true \
  --set nodePort.enabled=true \
  --set hubble.listenAddress=":4244"

After initial installation s/install/upgrade/ to redeploy if you want to test with other settings.

Access Hubble UI

Forward the Hubble UI port:

k3s kubectl port-forward -n kube-system svc/hubble-ui --address 0.0.0.0 --address :: 12000:80

Open your page in your browser:

http://localhost:12000 

Beliebte Posts aus diesem Blog