You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

73 lines
1.9 KiB

  1. # Cilium
  2. ## Kube-proxy replacement with Cilium
  3. Cilium can run without kube-proxy by setting `cilium_kube_proxy_replacement`
  4. to `strict`.
  5. Without kube-proxy, cilium needs to know the address of the kube-apiserver
  6. and this must be set globally for all cilium components (agents and operators).
  7. Hence, in this configuration in Kubespray, Cilium will always contact
  8. the external loadbalancer (even from a node in the control plane)
  9. and if there is no external load balancer It will ignore any local load
  10. balancer deployed by Kubespray and **only contacts the first master**.
  11. ## Choose Cilium version
  12. ```yml
  13. cilium_version: v1.11.0
  14. ```
  15. ## Add variable to config
  16. Use following variables:
  17. Example:
  18. ```yml
  19. cilium_config_extra_vars:
  20. enable-endpoint-routes: true
  21. ```
  22. ## Change Identity Allocation Mode
  23. Cilium assigns an identity for each endpoint. This identity is used to enforce basic connectivity between endpoints.
  24. Cilium currently supports two different identity allocation modes:
  25. - "crd" stores identities in kubernetes as CRDs (custom resource definition).
  26. - These can be queried with `kubectl get ciliumid`
  27. - "kvstore" stores identities in an etcd kvstore.
  28. ## Install Cilium Hubble
  29. k8s-net-cilium.yml:
  30. ```yml
  31. cilium_enable_hubble: true ## enable support hubble in cilium
  32. cilium_hubble_install: true ## install hubble-relay, hubble-ui
  33. cilium_hubble_tls_generate: true ## install hubble-certgen and generate certificates
  34. ```
  35. To validate that Hubble UI is properly configured, set up a port forwarding for hubble-ui service:
  36. ```shell script
  37. kubectl port-forward -n kube-system svc/hubble-ui 12000:80
  38. ```
  39. and then open [http://localhost:12000/](http://localhost:12000/).
  40. ## Hubble metrics
  41. ```yml
  42. cilium_enable_hubble_metrics: true
  43. cilium_hubble_metrics:
  44. - dns
  45. - drop
  46. - tcp
  47. - flow
  48. - icmp
  49. - http
  50. ```
  51. [More](https://docs.cilium.io/en/v1.9/operations/metrics/#hubble-exported-metrics)