Skip to content

NimTechnology

Trình bày các công nghệ CLOUD một cách dễ hiểu.

  • Kubernetes & Container
    • Docker
    • Kubernetes
      • Ingress
      • Pod
    • Helm Chart
    • OAuth2 Proxy
    • Isito-EnvoyFilter
    • Apache Kafka
      • Kafka
      • Kafka Connect
      • Lenses
    • Vault
    • Longhorn – Storage
    • VictoriaMetrics
    • MetalLB
    • Kong Gateway
  • CI/CD
    • ArgoCD
    • ArgoWorkflows
    • Argo Events
    • Spinnaker
    • Jenkins
    • Harbor
    • TeamCity
    • Git
      • Bitbucket
  • Coding
    • DevSecOps
    • Terraform
      • GCP – Google Cloud
      • AWS – Amazon Web Service
      • Azure Cloud
    • Golang
    • Laravel
    • Python
    • Jquery & JavaScript
    • Selenium
  • Log, Monitor & Tracing
    • DataDog
    • Prometheus
    • Grafana
    • ELK
      • Kibana
      • Logstash
  • BareMetal
    • NextCloud
  • Toggle search form

[Cilium/Hubble] Research together and install cilium instead of using kube-proxy and other CNI providers.

Posted on March 21, 2022September 17, 2023 By nim No Comments on [Cilium/Hubble] Research together and install cilium instead of using kube-proxy and other CNI providers.

Mình biết đến Cilium là do các anh bên infra trong công ty đang có plan POC and migrate các workload sang dataplane-v2 on GKE.

Và mình có thấy 1 dashboard cũng hay hay kiểu giống giống như kiali.

Contents

Toggle
  • 1) A few researching first.
  • 2) Install new kubernetes cluster with Cilium.
  • 3) Enable the Hubble UI
  • Provide LoadBalancer IP Address by Cilium.
  • 4) Install Cilium on EKS

1) A few researching first.

Điều đầu tiên trong link này dưới:
https://cloud.google.com/kubernetes-engine/docs/how-to/dataplane-v2
You can enable GKE Dataplane V2 when you create new clusters with GKE version 1.20.6-gke

Chúng ta sẽ cần dựng 1 cụm mới, 1 cluster mới. chứ không phải là upgrade cluster đang sử dụng.
Vấn để khá là khoai. My mission is the migrating spinnaker which is very hard.

Vấn đề này thì khá là hay ho trong: https://docs.cilium.io/en/v1.9/gettingstarted/kubeproxy-free/
Kubernetes Without kube-proxy:
This guide explains how to provision a Kubernetes cluster without kube-proxy, and to use Cilium to fully replace it
=> Điều này nghĩ là chúng ta ko cần sử dụng kube-proxy và nếu bạn đang sử dụng CNI: Calico hay Flannel thì xoá hết chúng đi vì Cilium cân được hết.

Nhìn hình thấy pro luôn òi.

2) Install new kubernetes cluster with Cilium.

Làm gì thì làm chúng ta cần cài lên thì mới vọc được.

Mình cài cluster k8s ở dưới on-premise bằng K0S. Nếu các bạn đã sem nhiều post của Nim chắc không là gì. Bạn làm theo link bên dưới nhé.
Install kubernetes with Cilium CNI Provider by K0s(update Sun, Mar 20th, 2022)

Bạn sẽ thấy ko có kube-proxy nữa.

Giờ test lại xem cluster mới cài lên đã work ngon lành chưa?

https://docs.cilium.io/en/v1.9/gettingstarted/k8s-install-kubeadm/#deploy-the-connectivity-test

>>>>>>create namespace.
kubectl create ns cilium-test

>>>>>>>deploy workload.
kubectl apply -n cilium-test -f https://raw.githubusercontent.com/cilium/cilium/v1.9/examples/kubernetes/connectivity-check/connectivity-check.yaml

Sau đó bạn show all ns cilium-test sẽ thấy có 1 service NodePort. Rồi bạn truy cập vào svc đó bằng browser nếu hiện lên hình thì ngon.

kubectl get all -n cilium-test
Mình có deploy 1 số workload thì mình thấy có object liên quan đến cilium.

Vậy là ngon rồi đó!

3) Enable the Hubble UI

https://docs.cilium.io/en/stable/gettingstarted/hubble/#service-map-hubble-ui

Hiện tại mình sẽ vẫn cài theo helm nhé.

Vì lúc trước mình cái cilium bằng cách khai báo helm chart trên K0s. Giờ mình muốn cài thêm Hubble UI

helm upgrade cilium cilium/cilium --version 1.11.2    --namespace kube-system    --reuse-values    --set hubble.relay.enabled=true    --set hubble.ui.enabled=true
Nó ko thấy helm tên là cilium đã được deploy để upgrade.
và mình list cũng chả thấy j?

Vậy mình install

helm install cilium cilium/cilium --version 1.11.2    --namespace kube-system    --set hubble.relay.enabled=true    --set hubble.ui.enabled=true

Vì mình biết helm name sẽ là cilium-1647758336
nên mình thực hiện upgrade cho đúng.

helm upgrade cilium-1647758336 cilium/cilium --version 1.11.2    --namespace kube-system    --reuse-values    --set hubble.relay.enabled=true    --set hubble.ui.enabled=true

Giờ thì config Nodeport sài ngay cho nóng.

kubectl edit service/hubble-ui -n kube-system
nhìn flow nhớ kiali của istio ghê

Ok phần này chúng ta sẽ dụng lại ở việc cài chạy.
Nếu có tính năng ghì hay ho mình sẽ post thêm

Provide LoadBalancer IP Address by Cilium.

Ở phiên cilium 1.13 chúng ta có feature so hot và rất vui cho anh em sài k8s on-premise.

từ giờ chúng ta không cần sử dụng metallb để provide IP Address cho service LoadBalancer

Reference Links:
https://dariomader.io/post/how_i_moved_from_metallb_to_cilium/

https://github.com/cilium/cilium/issues/18240

https://redmine.ungleich.ch/projects/open-infrastructure/wiki/The_ungleich_kubernetes_infrastructure

###Helm###
bgp:
  enabled: true
  announce:
    podCIDR: true
    loadbalancerIP: true


###ConfigMap###
apiVersion: v1
kind: ConfigMap
metadata:
  name: bgp-config
  namespace: cilium
data:
  config.yaml: |
    address-pools:
      - name: default
        protocol: bgp
        addresses:
          - 192.168.101.220/32

4) Install Cilium on EKS

https://medium.com/@amitmavgupta/cilium-support-for-eni-prefix-delegation-in-an-eks-cluster-feddf894160b

Kubernetes, Uncategorized

Post navigation

Previous Post: [APM/Elastic] Install APM Elastic inside container WordPress.
Next Post: [Spinnaker] Spin CLI

More Related Articles

[Sidecar/Kubernestes] Inject sidecar into a Pod automatically Kubernetes
[Rancher] Login Rancher by Azure ID or MicroSoft account. Azure Cloud
[Selelium] Install selelium on k8s and live demo Kubernetes
[Kasm] Stream your workspace directly to your web browser…on any device and from any location. BareMetal
[kubernetes/client-go] Go clients for talking to a kubernetes cluster. Golang
[Rancher] Control anything of K8S through Rancher Kubernetes

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

Tham Gia Group DevOps nhé!
Để Nim có nhiều động lực ra nhiều bài viết.
Để nhận được những thông báo mới nhất.

Recent Posts

  • [Azure] The subscription is not registered to use namespace ‘Microsoft.ContainerService’ May 8, 2025
  • [Azure] Insufficient regional vcpu quota left May 8, 2025
  • [WordPress] How to add a Dynamic watermark on WordPress. May 6, 2025
  • [vnet/Azure] VNet provisioning via Terraform. April 28, 2025
  • [tracetcp] How to perform a tracert command using a specific port. April 3, 2025

Archives

  • May 2025
  • April 2025
  • March 2025
  • February 2025
  • January 2025
  • December 2024
  • November 2024
  • October 2024
  • September 2024
  • August 2024
  • July 2024
  • June 2024
  • May 2024
  • April 2024
  • March 2024
  • February 2024
  • January 2024
  • December 2023
  • November 2023
  • October 2023
  • September 2023
  • August 2023
  • July 2023
  • June 2023
  • May 2023
  • April 2023
  • March 2023
  • February 2023
  • January 2023
  • December 2022
  • November 2022
  • October 2022
  • September 2022
  • August 2022
  • July 2022
  • June 2022
  • May 2022
  • April 2022
  • March 2022
  • February 2022
  • January 2022
  • December 2021
  • November 2021
  • October 2021
  • September 2021
  • August 2021
  • July 2021
  • June 2021

Categories

  • BareMetal
    • NextCloud
  • CI/CD
    • Argo Events
    • ArgoCD
    • ArgoWorkflows
    • Git
      • Bitbucket
    • Harbor
    • Jenkins
    • Spinnaker
    • TeamCity
  • Coding
    • DevSecOps
    • Golang
    • Jquery & JavaScript
    • Laravel
    • NextJS 14 & ReactJS & Type Script
    • Python
    • Selenium
    • Terraform
      • AWS – Amazon Web Service
      • Azure Cloud
      • GCP – Google Cloud
  • Kubernetes & Container
    • Apache Kafka
      • Kafka
      • Kafka Connect
      • Lenses
    • Docker
    • Helm Chart
    • Isito-EnvoyFilter
    • Kong Gateway
    • Kubernetes
      • Ingress
      • Pod
    • Longhorn – Storage
    • MetalLB
    • OAuth2 Proxy
    • Vault
    • VictoriaMetrics
  • Log, Monitor & Tracing
    • DataDog
    • ELK
      • Kibana
      • Logstash
    • Fluent
    • Grafana
    • Prometheus
  • Uncategorized
  • Admin

Copyright © 2025 NimTechnology.