kuma
Table of Content
kuma¶
2024-04-25
tried to deploy using helm. it went ok, but wasnt sure if I want to use it. archive.
what is kuma?¶
The open-source control plane for service mesh, delivering security, observability, routing and more
requirement¶
https://kuma.io/docs/2.7.x/introduction/kuma-requirements/
In short, a control-plane with 4vCPU and 2GB of memory will be able to accommodate more than 1000 data planes.
deployment¶
https://kuma.io/docs/2.7.x/production/deployment/single-zone/
https://kuma.io/docs/2.7.x/production/cp-deployment/single-zone/
I am going with a single-zone deployment.
I will have the copy of the values file as usual.
# add helm repo for kuma
helm repo add kuma https://kumahq.github.io/charts
# working directory
cd ./infrastructure/hlv2/controllers/default-values
# confirm the chart version and get the values file copy
helm search repo kuma
helm show values kuma/kuma --version=2.7.1 > kuma-2.7.1-values.yaml
cp kuma-2.7.1-values.yaml ../kuma-values.yaml
There was no change to make in the values file for now.
Create the kuma-system namespace and flux helmrepo and helmrelease manifests.
---
apiVersion: v1
kind: Namespace
metadata:
name: kuma-system
labels:
service: kuma-system
type: infrastructure
#!/bin/bash
# add flux helmrepo to the manifest
flux create source helm kuma \
--url=https://kumahq.github.io/charts \
--interval=1h0m0s \
--namespace=flux-system \
--export >kuma.yaml
# add flux helm release to the manifest including the customized values.yaml file
flux create helmrelease kuma \
--source=HelmRepository/kuma \
--chart=kuma \
--chart-version=2.7.1 \
--values=./kuma-values.yaml \
--interval=10m \
--namespace=flux-system \
--target-namespace=kuma-system \
--export >>kuma.yaml
And here is the result.
NAME READY STATUS RESTARTS AGE
pod/kuma-control-plane-59d8464df6-pldtv 1/1 Running 0 42s
NAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGE
service/kuma-control-plane ClusterIP 10.111.233.201 <none> 5680/TCP,5681/TCP,5682/TCP,443/TCP,5676/TCP,5678/TCP 42s
NAME READY UP-TO-DATE AVAILABLE AGE
deployment.apps/kuma-control-plane 1/1 1 1 42s
NAME DESIRED CURRENT READY AGE
replicaset.apps/kuma-control-plane-59d8464df6 1 1 1 42s
ref) api-resources and crds¶
Here is the api-resources and crds.
circuitbreakers kuma.io/v1alpha1 false CircuitBreaker
containerpatches kuma.io/v1alpha1 true ContainerPatch
dataplaneinsights kuma.io/v1alpha1 true DataplaneInsight
dataplanes kuma.io/v1alpha1 true Dataplane
externalservices kuma.io/v1alpha1 false ExternalService
faultinjections kuma.io/v1alpha1 false FaultInjection
healthchecks kuma.io/v1alpha1 false HealthCheck
meshaccesslogs kuma.io/v1alpha1 true MeshAccessLog
meshcircuitbreakers kuma.io/v1alpha1 true MeshCircuitBreaker
meshes kuma.io/v1alpha1 false Mesh
meshfaultinjections kuma.io/v1alpha1 true MeshFaultInjection
meshgatewayconfigs kuma.io/v1alpha1 false MeshGatewayConfig
meshgatewayinstances kuma.io/v1alpha1 true MeshGatewayInstance
meshgatewayroutes kuma.io/v1alpha1 false MeshGatewayRoute
meshgateways kuma.io/v1alpha1 false MeshGateway
meshhealthchecks kuma.io/v1alpha1 true MeshHealthCheck
meshhttproutes kuma.io/v1alpha1 true MeshHTTPRoute
meshinsights kuma.io/v1alpha1 false MeshInsight
meshloadbalancingstrategies kuma.io/v1alpha1 true MeshLoadBalancingStrategy
meshmetrics kuma.io/v1alpha1 true MeshMetric
meshproxypatches kuma.io/v1alpha1 true MeshProxyPatch
meshratelimits kuma.io/v1alpha1 true MeshRateLimit
meshretries kuma.io/v1alpha1 true MeshRetry
meshservices kuma.io/v1alpha1 true MeshService
meshtcproutes kuma.io/v1alpha1 true MeshTCPRoute
meshtimeouts kuma.io/v1alpha1 true MeshTimeout
meshtraces kuma.io/v1alpha1 true MeshTrace
meshtrafficpermissions kuma.io/v1alpha1 true MeshTrafficPermission
proxytemplates kuma.io/v1alpha1 false ProxyTemplate
ratelimits kuma.io/v1alpha1 false RateLimit
retries kuma.io/v1alpha1 false Retry
serviceinsights kuma.io/v1alpha1 false ServiceInsight
timeouts kuma.io/v1alpha1 false Timeout
trafficlogs kuma.io/v1alpha1 false TrafficLog
trafficpermissions kuma.io/v1alpha1 false TrafficPermission
trafficroutes kuma.io/v1alpha1 false TrafficRoute
traffictraces kuma.io/v1alpha1 false TrafficTrace
virtualoutbounds kuma.io/v1alpha1 false VirtualOutbound
zoneegresses kuma.io/v1alpha1 true ZoneEgress
zoneegressinsights kuma.io/v1alpha1 true ZoneEgressInsight
zoneingresses kuma.io/v1alpha1 true ZoneIngress
zoneingressinsights kuma.io/v1alpha1 true ZoneIngressInsight
zoneinsights kuma.io/v1alpha1 false ZoneInsight
zones kuma.io/v1alpha1 false Zone
circuitbreakers.kuma.io 2024-04-25T04:43:46Z
containerpatches.kuma.io 2024-04-25T04:43:47Z
dataplaneinsights.kuma.io 2024-04-25T04:43:46Z
dataplanes.kuma.io 2024-04-25T04:43:46Z
externalservices.kuma.io 2024-04-25T04:43:46Z
faultinjections.kuma.io 2024-04-25T04:43:47Z
healthchecks.kuma.io 2024-04-25T04:43:47Z
meshaccesslogs.kuma.io 2024-04-25T04:43:46Z
meshcircuitbreakers.kuma.io 2024-04-25T04:43:47Z
meshes.kuma.io 2024-04-25T04:43:47Z
meshfaultinjections.kuma.io 2024-04-25T04:43:46Z
meshgatewayconfigs.kuma.io 2024-04-25T04:44:30Z
meshgatewayinstances.kuma.io 2024-04-25T04:43:47Z
meshgatewayroutes.kuma.io 2024-04-25T04:43:47Z
meshgateways.kuma.io 2024-04-25T04:43:46Z
meshhealthchecks.kuma.io 2024-04-25T04:43:46Z
meshhttproutes.kuma.io 2024-04-25T04:43:46Z
meshinsights.kuma.io 2024-04-25T04:43:47Z
meshloadbalancingstrategies.kuma.io 2024-04-25T04:43:47Z
meshmetrics.kuma.io 2024-04-25T04:43:46Z
meshproxypatches.kuma.io 2024-04-25T04:43:47Z
meshratelimits.kuma.io 2024-04-25T04:43:47Z
meshretries.kuma.io 2024-04-25T04:43:47Z
meshservices.kuma.io 2024-04-25T04:43:47Z
meshtcproutes.kuma.io 2024-04-25T04:43:47Z
meshtimeouts.kuma.io 2024-04-25T04:43:47Z
meshtraces.kuma.io 2024-04-25T04:43:47Z
meshtrafficpermissions.kuma.io 2024-04-25T04:43:46Z
proxytemplates.kuma.io 2024-04-25T04:43:47Z
ratelimits.kuma.io 2024-04-25T04:43:47Z
retries.kuma.io 2024-04-25T04:43:46Z
serviceinsights.kuma.io 2024-04-25T04:43:47Z
timeouts.kuma.io 2024-04-25T04:43:46Z
trafficlogs.kuma.io 2024-04-25T04:43:47Z
trafficpermissions.kuma.io 2024-04-25T04:43:46Z
trafficroutes.kuma.io 2024-04-25T04:43:46Z
traffictraces.kuma.io 2024-04-25T04:43:46Z
virtualoutbounds.kuma.io 2024-04-25T04:43:47Z
zoneegresses.kuma.io 2024-04-25T04:43:46Z
zoneegressinsights.kuma.io 2024-04-25T04:43:47Z
zoneingresses.kuma.io 2024-04-25T04:43:47Z
zoneingressinsights.kuma.io 2024-04-25T04:43:46Z
zoneinsights.kuma.io 2024-04-25T04:43:47Z
zones.kuma.io 2024-04-25T04:43:47Z
$ for CRD in $(kubectl get crd -n kuma-system | awk '/kuma.io/ {print $1}'); do kubectl get "$CRD" -n kuma-system -o name; done
meshcircuitbreaker.kuma.io/mesh-circuit-breaker-all-default
mesh.kuma.io/default
meshinsight.kuma.io/default
meshretry.kuma.io/mesh-retry-all-default
meshtimeout.kuma.io/mesh-gateways-timeout-all-default
meshtimeout.kuma.io/mesh-timeout-all-default
zone.kuma.io/default
kuma cni¶
https://kuma.io/docs/2.7.x/production/dp-config/cni/
Let me try this.
diff --git a/infrastructure/hlv2/controllers/kuma-values.yaml b/infrastructure/hlv2/controllers/kuma-values.yaml
index 3c40583..16f78f7 100644
--- a/infrastructure/hlv2/controllers/kuma-values.yaml
+++ b/infrastructure/hlv2/controllers/kuma-values.yaml
@@ -327,15 +327,15 @@ controlPlane:
cni:
# -- Install Kuma with CNI instead of proxy init container
- enabled: false
+ enabled: true
# -- Install CNI in chained mode
- chained: false
+ chained: true
# -- Set the CNI install directory
- netDir: /etc/cni/multus/net.d
+ netDir: /etc/cni/net.d
# -- Set the CNI bin directory
- binDir: /var/lib/cni/bin
+ binDir: /opt/cni/bin
# -- Set the CNI configuration name
- confName: kuma-cni.conf
+ confName: 10-calico.conflist
# -- CNI log level: one of off,info,debug
logLevel: info
# -- Node Selector for the CNI pods
I do not know how this is changing anything.
gateway¶
https://kuma.io/docs/2.7.x/using-mesh/managing-ingress-traffic/gateway-api/
https://gateway-api.sigs.k8s.io/guides/#install-standard-channel
Let me get the k8s gateway-api standard install manifest and add it to the infra-controllers ks.
cd ./infrastructure/hlv2/controllers/crds
curl -L https://github.com/kubernetes-sigs/gateway-api/releases/download/v1.0.0/standard-install.yaml -o gateway-api-v1.0.0-standard-install.yaml
Here is the result.
$ kubectl api-resources | grep gateway.networking.k8s.io
gatewayclasses gc gateway.networking.k8s.io/v1 false GatewayClass
gateways gtw gateway.networking.k8s.io/v1 true Gateway
httproutes gateway.networking.k8s.io/v1 true HTTPRoute
referencegrants refgrant gateway.networking.k8s.io/v1beta1 true ReferenceGrant
$ kubectl get crds | grep gateway.networking.k8s.io
gatewayclasses.gateway.networking.k8s.io 2024-04-25T06:42:53Z
gateways.gateway.networking.k8s.io 2024-04-25T06:42:53Z
httproutes.gateway.networking.k8s.io 2024-04-25T06:42:53Z
referencegrants.gateway.networking.k8s.io 2024-04-25T06:42:53Z
Now, since the gateway controller for kuma gets created during the installation only when the gateway-api crds are present, so let me uninstall and install the kuma again.