Skip to content

Commit

Permalink
Updaet the kuma docs and local testing
Browse files Browse the repository at this point in the history
  • Loading branch information
ranjith-ka committed Feb 9, 2024
1 parent ff4d148 commit cfc411c
Show file tree
Hide file tree
Showing 8 changed files with 874 additions and 1 deletion.
13 changes: 13 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,14 @@ install-tools: download

build: generate compile

install-helm:
@curl https://raw.githubusercontent.com/helm/helm/master/scripts/get-helm-3 | bash

install-kubectl:
@curl -LO "https://dl.k8s.io/release/$(curl -L -s https://dl.k8s.io/release/stable.txt)/bin/darwin/amd64/kubectl"
@chmod +x kubectl
@sudo mv kubectl /usr/local/bin/

generate:
@echo Generate code
@go generate ./...
Expand Down Expand Up @@ -121,6 +129,11 @@ ingress:
@echo Installing Ingress Helm Chart
@helm install -f minikube/nginx/values.yaml nginx ingress-nginx/ingress-nginx --version 4.4.2

ingress2:
@helm repo add ingress-nginx https://kubernetes.github.io/ingress-nginx
@echo Installing Ingress Helm Chart
@helm install -f minikube/nginx/values2.yaml nginx ingress-nginx/ingress-nginx --version 4.4.2

install-canary-app:
@helm install -f minikube/dev/canary.yaml canary-dev charts/dev
@helm install -f minikube/dev/prd.yaml prd-dev charts/dev
Expand Down
20 changes: 20 additions & 0 deletions kind/config2.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
## This version is for kind v0.19.0 // https://github.com/kubernetes-sigs/kind/releases/tag/v0.19.0
kind: Cluster
apiVersion: kind.x-k8s.io/v1alpha4
nodes:
- role: control-plane
image: kindest/node:v1.27.1@sha256:b7d12ed662b873bd8510879c1846e87c7e676a79fefc93e17b2a52989d3ff42b
- role: worker
extraPortMappings:
- containerPort: 32081
hostPort: 8080
protocol: tcp
- containerPort: 32444
hostPort: 1443
- containerPort: 31444
hostPort: 143
- containerPort: 31698
hostPort: 57017
- containerPort: 31698
hostPort: 9093
image: kindest/node:v1.27.1@sha256:b7d12ed662b873bd8510879c1846e87c7e676a79fefc93e17b2a52989d3ff42b
4 changes: 4 additions & 0 deletions make/kind.mk
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,10 @@ kind-cluster:
@echo Creating Kind environment
@kind create cluster --config kind/config.yaml --name k8s

kind-cluster2:
@echo Creating Kind environment
@kind create cluster --config kind/config2.yaml --name k8s2

load-image:
@kind load docker-image ranjithka/canary:0.0.1 --name k8s
@kind load docker-image ranjithka/canary:latest --name k8s
Expand Down
47 changes: 46 additions & 1 deletion minikube/kuma/Tutorial/02_kuma_production.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,10 +31,55 @@ Use kumactl to configure a multi-zone or single-zone control plane, depending on
A zone can be a Kubernetes cluster, a VPC, or any other deployment you need to include in the same distributed mesh environment. The only condition is that all the data planes running within the zone must be able to connect to the other data planes in this same zone.

Zone-a & Zone-b (with or without Egress)

service -> service (via Zone Ingress), This ZoneIngress resource is then also synchronized to the global control plane.

The global control-plane will propagate the zone ingress resources and all policies to all other zones over Kuma Discovery Service (KDS), which is a protocol based on xDS.

![alt text](https://kuma.io/assets/images/diagrams/gslides/kuma_multizone_without_egress.svg)

### Components of a multi-zone deployment

- Global control plane (kuma-cp)
- Zone control plane (kuma-cp)
- Data plane proxies (kuma-dp)
- Zone Ingress (kuma-ingress)
- Zone Egress (kuma-egress)

### Failure modes

- Global control plane failure
- No policies updates
- new service will not be discoverable in other zones
- service removed still appears
- Zone deletion not possible


- Zone control plane failure
- New data plane proxies won't be able to join the mesh. This includes new instances (Pod/VM) that are newly created by automatic deployment mechanisms (e.g., rolling update process), meaning a control plane failure will prevent new instances from joining the mesh.
- mTLS certiface refresh will fail
- Data plane proxy configuration will not be updated

### Communication between Global and Zone control plane failing

### Communication between 2 zones failing

<! Too much info before i understand this prodcut>

## kumactl

You can configure kumactl to point to any zone kuma-cp instance by running:
```
$ kumactl config control-planes add --name=XYZ --address=http://{address-to-kuma}:5681
$ kumactl get meshes
```

Kuma - being an application that wants to improve the underlying connectivity between your services by making the underlying network more reliable - also comes with some networking requirements itself.

## Control plane ports

5682: HTTPS version of the services available under 5681
5683: gRPC Intercommunication CP server used internally by Kuma to communicate between CP instances.
5685: the Kuma Discovery Service port, leveraged in multi-zone deployments.

//TODO
9 changes: 9 additions & 0 deletions minikube/kuma/Tutorial/03_deployments.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
# Kuma Deployments

```bash
$ helm install --namespace kuma-system --set "controlPlane.mode=zone" kuma kuma/kuma
```

## Single-zone deployment

### Deploy a single-zone control plane
Loading

0 comments on commit cfc411c

Please sign in to comment.