SlideShare a Scribd company logo
How it works, what we can monitor with it and why is it
different
By João Esperancinha (2024/03/31)
Who am I?
Overview
Understanding the problems
Project objective
Target audience
Market trends
Cycle diagram
João Esperancinha
● Java
● Kotlin
● Groovy
● Scala
● Software Engineer 10+ years
● JESPROTECH owner for 1 year
● Kong Champion
● Java Professional
● Spring Professional
Intro
What is Kuma?
Intro - What is Kuma?
Kuma is a platform agnostic
open-source control plane for
service mesh and microservices
management, with support for
Kubernetes, VM, and bare metal
environments.
https://kuma.io/docs/2.6.x/introduction/overview-of-kuma/
Chapter I
Getting the services
up and running
Chapter I - Summary
Before even beginning exploring Kuma we need a
complete cluster and a functional application system
01 | Our application
02 | Installing all commands
03 | Creating a Cluster
04 | Creating a local docker registry
05 | Going through the code
06 | Making the deploy scripts
07 | Running the Demo application
Step 1
Our application
Chapter I
https://github.com/jesperancinha/wild-life-safety-monitor
Chapter I - Our Application
Albatross pictureby chrispearson72 Flickr stream CC BY 2.0 DEED / https://nl.wikipedia.org/wiki/Albatrossen#/media/Bestand:Black_Browed_Albatross_gnd.jpg
Chapter I - Our Application
Albatross pictureby chrispearson72 Flickr stream CC BY 2.0 DEED / https://nl.wikipedia.org/wiki/Albatrossen#/media/Bestand:Black_Browed_Albatross_gnd.jpg
Step 2
Installing all
commands
Chapter I
What do we need in general
1
A cluster to get our pods running.
This will be achieved with kind.
(kubernetes in docker)
3
A way to manage and configure our pods.
This will be achieved with kubectl
2
A local registry that we can access inside
our deployment environment.
This will be achieved with kind
4
A command to allow Kuma to install the
environment and inject the sidecars.
This will be achieved with kumactl.
Chapter I - Our Application
Step 3
Creating
a Cluster
Chapter I
Chapter I - Our Application
kind create cluster --name=wlsm-mesh-zone
kubectl cluster-info --context kind-wlsm-mesh-zone
Creating a Cluster
Chapter I - Our Application
helm repo add kuma https://kumahq.github.io/charts
helm repo update
helm upgrade -i kuma kuma/kuma
helm install --create-namespace --namespace kuma-system kuma kuma/kuma
Creating a Cluster - Control Plane GUI
Step 4
Creating a
local docker
registry
Chapter I
Chapter I - Our Application
./kind-with-registry.sh
Creating a local docker registry
Chapter I - Our Application
docker build . --tag localhost:5001/wlsm-listener-service;
docker push localhost:5001/wlsm-listener-service;
Creating a local docker registry
Step 5
Going
through
the code
Chapter I
Chapter I - Our Application
spring.r2dbc.url=r2dbc:postgresql://wlsm-database-deployment.wlsm-namespace.svc.cluster.local:5432/wlsm
Going through the code
wslm.url.collector=http://wlsm-collector-deployment.wlsm-namespace.svc.cluster.local:8081/api/v1/collector
Listener Service
Collector Service
Step 6
Making
the deploy
scripts
Chapter I
Chapter I - Our Application
apiVersion: v1
kind: Namespace
metadata:
name: wlsm-namespace
labels:
kuma.io/sidecar-injection: enabled
---
Making the deploy scripts
---
apiVersion: v1
kind: Service
metadata:
name: wlsm-listener-deployment
spec:
selector:
app: wlsm-listener
ports:
- protocol: TCP
appProtocol: http
port: 8080
apiVersion: apps/v1
kind: Deployment
metadata:
name: wlsm-listener
namespace: wlsm-namespace
spec:
replicas: 1
selector:
matchLabels:
app: wlsm-listener
template:
metadata:
labels:
app: wlsm-listener
spec:
containers:
- name: wlsm-listener-service
image: localhost:5001/wlsm-listener-service:latest
imagePullPolicy: Always
ports:
- containerPort: 8080
Step 7
Running
the application
Chapter I
Chapter I - Our Application
Running the application
kubectl apply -f listener-deployment.yaml --force;
Chapter II
Exploring
Kuma features
Chapter II - Exploring Kuma features
MeshTrafficPermission
echo "apiVersion: kuma.io/v1alpha1
kind: MeshTrafficPermission
metadata:
namespace: kuma-system
name: mtp
spec:
targetRef:
kind: Mesh
from:
- targetRef:
kind: Mesh
default:
action: Allow" | kubectl apply -f -
Chapter II - Exploring Kuma features
Mesh
echo "apiVersion: kuma.io/v1alpha1
kind: Mesh
metadata:
name: default
spec:
mtls:
enabledBackend: ca-1
backends:
- name: ca-1
type: builtin" | kubectl apply -f -
Chapter II - Exploring Kuma features
MeshTrafficPermission (Deny)
apiVersion: kuma.io/v1alpha1
kind: MeshTrafficPermission
metadata:
namespace: kuma-system
name: mtp
spec:
targetRef:
kind: Mesh
from:
- targetRef:
kind: Mesh
default:
action: Deny" | kubectl apply -f -
Chapter II - Exploring Kuma features
MeshTrafficPermission (Specific)
echo "
apiVersion: kuma.io/v1alpha1
kind: MeshTrafficPermission
metadata:
namespace: kuma-system
name: wlsm-database
spec:
targetRef:
kind: MeshService
name: wlsm-database-deployment_wlsm-namespace_svc_5432
from:
- targetRef:
kind: MeshService
name: wlsm-collector-deployment_wlsm-namespace_svc_8081
default:
action: Allow" | kubectl apply -f -
Chapter II - Exploring Kuma features
MeshFaultInjection (Specific)
echo "
apiVersion: kuma.io/v1alpha1
kind: MeshFaultInjection
metadata:
name: default
namespace: kuma-system
labels:
kuma.io/mesh: default # optional, defaults to `default` if it isn't configured
spec:
targetRef:
kind: MeshService
name: wlsm-collector-deployment_wlsm-namespace_svc_8081
from:
- targetRef:
kind: MeshService
name: wlsm-listener-deployment_wlsm-namespace_svc_8080
default:
http:
- abort:
httpStatus: 500
percentage: 50" | kubectl apply -f -
● Source Repository
○ https://github.com/jesperancinha/wild-life-safety-monitor
Use git clone from the command prompt to download the full code base:
> git clone https://github.com/jesperancinha/wild-life-safety-monitor.git
You’ll be prompted for a username and password which should be your github account.
The easy way:
> make b
> make run
The manual way:
> gradle build
> ./gradlew run
Project Location
Resources:
● K9s
● https://support.konghq.com/support/s/article/How-to-enable-debug-logging-for-kuma-sidecar-without-
using-port-forward
● https://spacelift.io/blog/kubectl-logs
● https://docs.konghq.com/mesh/latest/policies/meshtrafficpermission/
● https://kuma.io/features/
Questions?
Thank you.

More Related Content

Similar to Kuma Meshes Part I - The basics - A tutorial (20)

PPTX
Openshift Presentation ppt compare with VM
shubhamage1
 
PDF
Spring boot microservice metrics monitoring
Oracle Korea
 
PDF
Spring Boot - Microservice Metrics Monitoring
DonghuKIM2
 
PDF
Kubernetes laravel and kubernetes
William Stewart
 
PDF
A Shift from Monolith to Microservice using Docker
Ajeet Singh Raina
 
PDF
2016 - Easing Your Way Into Docker: Lessons From a Journey to Production
devopsdaysaustin
 
PDF
Pycon9 - Paas per tutti i gusti con Dokku and Kubernetes
Claudio Mignanti
 
PPTX
IBM MQ in containers MQTC 2017
Robert Parker
 
PDF
From CoreOS to Kubernetes and Concourse CI
Denis Izmaylov
 
PPTX
Using the New Apache Flink Kubernetes Operator in a Production Deployment
Flink Forward
 
PDF
Docker and IBM Integration Bus
Geza Geleji
 
PPTX
Dockerizing Ruby Applications - The Best Practices
Kontena, Inc.
 
PDF
Introduction to Docker - Vellore Institute of Technology
Ajeet Singh Raina
 
PDF
HPC Cloud Burst Using Docker
IRJET Journal
 
PPTX
[Codelab 2017] Docker 기초 및 활용 방안
양재동 코드랩
 
PDF
Digital Forensics and Incident Response in The Cloud Part 3
Velocidex Enterprises
 
PDF
Enabling Hybrid Workflows with Docker/Mesos @Orbitz
Steve Hoffman
 
PDF
"Wie passen Serverless & Autonomous zusammen?"
Volker Linz
 
PDF
Red Hat Forum Benelux 2015
Microsoft
 
PDF
Docker puebla bday #4 celebration
Ramon Morales
 
Openshift Presentation ppt compare with VM
shubhamage1
 
Spring boot microservice metrics monitoring
Oracle Korea
 
Spring Boot - Microservice Metrics Monitoring
DonghuKIM2
 
Kubernetes laravel and kubernetes
William Stewart
 
A Shift from Monolith to Microservice using Docker
Ajeet Singh Raina
 
2016 - Easing Your Way Into Docker: Lessons From a Journey to Production
devopsdaysaustin
 
Pycon9 - Paas per tutti i gusti con Dokku and Kubernetes
Claudio Mignanti
 
IBM MQ in containers MQTC 2017
Robert Parker
 
From CoreOS to Kubernetes and Concourse CI
Denis Izmaylov
 
Using the New Apache Flink Kubernetes Operator in a Production Deployment
Flink Forward
 
Docker and IBM Integration Bus
Geza Geleji
 
Dockerizing Ruby Applications - The Best Practices
Kontena, Inc.
 
Introduction to Docker - Vellore Institute of Technology
Ajeet Singh Raina
 
HPC Cloud Burst Using Docker
IRJET Journal
 
[Codelab 2017] Docker 기초 및 활용 방안
양재동 코드랩
 
Digital Forensics and Incident Response in The Cloud Part 3
Velocidex Enterprises
 
Enabling Hybrid Workflows with Docker/Mesos @Orbitz
Steve Hoffman
 
"Wie passen Serverless & Autonomous zusammen?"
Volker Linz
 
Red Hat Forum Benelux 2015
Microsoft
 
Docker puebla bday #4 celebration
Ramon Morales
 

More from João Esperancinha (17)

PDF
Decoding Kotlin - Your Guide to Solving the Mysterious in Kotlin - Devoxx PL ...
João Esperancinha
 
PPTX
Decoding Kotlin - Your guide to solving the mysterious in Kotlin - JNation2025
João Esperancinha
 
PPTX
Could Virtual Threads cast away the usage of Kotlin Coroutines - DevoxxUK2025
João Esperancinha
 
PPTX
Boosting performance and functional style with Project Arrow from a practical...
João Esperancinha
 
PPTX
Start from the Package in Spring CDS - Basic course
João Esperancinha
 
PPTX
Apollo 4 Kotlin made me Graphql and I learned how to use it
João Esperancinha
 
PPTX
Monads are no Nomads - Unlocking the basics
João Esperancinha
 
PPTX
C.R.a.C in Spring - I froze my server! (15 minute session for NLJUG speaker a...
João Esperancinha
 
PPTX
Could Virtual Threads cast away the usage of Kotlin Coroutines
João Esperancinha
 
PPTX
Managing gRPC Services using Kong KONNECT and the KONG API Gateway
João Esperancinha
 
PPTX
Decoding Kotlin - Your guide to solving the mysterious in Kotlin.pptx
João Esperancinha
 
PPTX
Fields in Java and Kotlin and what to expect.pptx
João Esperancinha
 
PPTX
Demystifying Co, Contra, In Kotlin modifier keywords.pptx
João Esperancinha
 
PPTX
Unlocking the Power of Kotlin Channels.pptx
João Esperancinha
 
PPTX
Exploring Tailrec Through Time Until Kotlin.pptx
João Esperancinha
 
PPTX
Reactive programming with Spring Webflux.pptx
João Esperancinha
 
PPTX
KONNECT Kong-Presentation How to protect web applications
João Esperancinha
 
Decoding Kotlin - Your Guide to Solving the Mysterious in Kotlin - Devoxx PL ...
João Esperancinha
 
Decoding Kotlin - Your guide to solving the mysterious in Kotlin - JNation2025
João Esperancinha
 
Could Virtual Threads cast away the usage of Kotlin Coroutines - DevoxxUK2025
João Esperancinha
 
Boosting performance and functional style with Project Arrow from a practical...
João Esperancinha
 
Start from the Package in Spring CDS - Basic course
João Esperancinha
 
Apollo 4 Kotlin made me Graphql and I learned how to use it
João Esperancinha
 
Monads are no Nomads - Unlocking the basics
João Esperancinha
 
C.R.a.C in Spring - I froze my server! (15 minute session for NLJUG speaker a...
João Esperancinha
 
Could Virtual Threads cast away the usage of Kotlin Coroutines
João Esperancinha
 
Managing gRPC Services using Kong KONNECT and the KONG API Gateway
João Esperancinha
 
Decoding Kotlin - Your guide to solving the mysterious in Kotlin.pptx
João Esperancinha
 
Fields in Java and Kotlin and what to expect.pptx
João Esperancinha
 
Demystifying Co, Contra, In Kotlin modifier keywords.pptx
João Esperancinha
 
Unlocking the Power of Kotlin Channels.pptx
João Esperancinha
 
Exploring Tailrec Through Time Until Kotlin.pptx
João Esperancinha
 
Reactive programming with Spring Webflux.pptx
João Esperancinha
 
KONNECT Kong-Presentation How to protect web applications
João Esperancinha
 
Ad

Recently uploaded (20)

PDF
The Rise of AI and IoT in Mobile App Tech.pdf
IMG Global Infotech
 
PDF
Smart Trailers 2025 Update with History and Overview
Paul Menig
 
PDF
Achieving Consistent and Reliable AI Code Generation - Medusa AI
medusaaico
 
PDF
IoT-Powered Industrial Transformation – Smart Manufacturing to Connected Heal...
Rejig Digital
 
PDF
CIFDAQ Market Wrap for the week of 4th July 2025
CIFDAQ
 
PDF
Bitcoin for Millennials podcast with Bram, Power Laws of Bitcoin
Stephen Perrenod
 
PDF
[Newgen] NewgenONE Marvin Brochure 1.pdf
darshakparmar
 
PPTX
Building Search Using OpenSearch: Limitations and Workarounds
Sease
 
PDF
Building Real-Time Digital Twins with IBM Maximo & ArcGIS Indoors
Safe Software
 
PPTX
From Sci-Fi to Reality: Exploring AI Evolution
Svetlana Meissner
 
PDF
Agentic AI lifecycle for Enterprise Hyper-Automation
Debmalya Biswas
 
PDF
Empower Inclusion Through Accessible Java Applications
Ana-Maria Mihalceanu
 
PDF
From Code to Challenge: Crafting Skill-Based Games That Engage and Reward
aiyshauae
 
PPTX
OpenID AuthZEN - Analyst Briefing July 2025
David Brossard
 
PDF
July Patch Tuesday
Ivanti
 
PDF
Chris Elwell Woburn, MA - Passionate About IT Innovation
Chris Elwell Woburn, MA
 
PDF
HubSpot Main Hub: A Unified Growth Platform
Jaswinder Singh
 
PDF
LLMs.txt: Easily Control How AI Crawls Your Site
Keploy
 
PDF
Biography of Daniel Podor.pdf
Daniel Podor
 
PPTX
Q2 FY26 Tableau User Group Leader Quarterly Call
lward7
 
The Rise of AI and IoT in Mobile App Tech.pdf
IMG Global Infotech
 
Smart Trailers 2025 Update with History and Overview
Paul Menig
 
Achieving Consistent and Reliable AI Code Generation - Medusa AI
medusaaico
 
IoT-Powered Industrial Transformation – Smart Manufacturing to Connected Heal...
Rejig Digital
 
CIFDAQ Market Wrap for the week of 4th July 2025
CIFDAQ
 
Bitcoin for Millennials podcast with Bram, Power Laws of Bitcoin
Stephen Perrenod
 
[Newgen] NewgenONE Marvin Brochure 1.pdf
darshakparmar
 
Building Search Using OpenSearch: Limitations and Workarounds
Sease
 
Building Real-Time Digital Twins with IBM Maximo & ArcGIS Indoors
Safe Software
 
From Sci-Fi to Reality: Exploring AI Evolution
Svetlana Meissner
 
Agentic AI lifecycle for Enterprise Hyper-Automation
Debmalya Biswas
 
Empower Inclusion Through Accessible Java Applications
Ana-Maria Mihalceanu
 
From Code to Challenge: Crafting Skill-Based Games That Engage and Reward
aiyshauae
 
OpenID AuthZEN - Analyst Briefing July 2025
David Brossard
 
July Patch Tuesday
Ivanti
 
Chris Elwell Woburn, MA - Passionate About IT Innovation
Chris Elwell Woburn, MA
 
HubSpot Main Hub: A Unified Growth Platform
Jaswinder Singh
 
LLMs.txt: Easily Control How AI Crawls Your Site
Keploy
 
Biography of Daniel Podor.pdf
Daniel Podor
 
Q2 FY26 Tableau User Group Leader Quarterly Call
lward7
 
Ad

Kuma Meshes Part I - The basics - A tutorial

  • 1. How it works, what we can monitor with it and why is it different By João Esperancinha (2024/03/31)
  • 2. Who am I? Overview Understanding the problems Project objective Target audience Market trends Cycle diagram João Esperancinha ● Java ● Kotlin ● Groovy ● Scala ● Software Engineer 10+ years ● JESPROTECH owner for 1 year ● Kong Champion ● Java Professional ● Spring Professional
  • 4. Intro - What is Kuma? Kuma is a platform agnostic open-source control plane for service mesh and microservices management, with support for Kubernetes, VM, and bare metal environments. https://kuma.io/docs/2.6.x/introduction/overview-of-kuma/
  • 5. Chapter I Getting the services up and running
  • 6. Chapter I - Summary Before even beginning exploring Kuma we need a complete cluster and a functional application system 01 | Our application 02 | Installing all commands 03 | Creating a Cluster 04 | Creating a local docker registry 05 | Going through the code 06 | Making the deploy scripts 07 | Running the Demo application
  • 7. Step 1 Our application Chapter I https://github.com/jesperancinha/wild-life-safety-monitor
  • 8. Chapter I - Our Application Albatross pictureby chrispearson72 Flickr stream CC BY 2.0 DEED / https://nl.wikipedia.org/wiki/Albatrossen#/media/Bestand:Black_Browed_Albatross_gnd.jpg
  • 9. Chapter I - Our Application Albatross pictureby chrispearson72 Flickr stream CC BY 2.0 DEED / https://nl.wikipedia.org/wiki/Albatrossen#/media/Bestand:Black_Browed_Albatross_gnd.jpg
  • 11. What do we need in general 1 A cluster to get our pods running. This will be achieved with kind. (kubernetes in docker) 3 A way to manage and configure our pods. This will be achieved with kubectl 2 A local registry that we can access inside our deployment environment. This will be achieved with kind 4 A command to allow Kuma to install the environment and inject the sidecars. This will be achieved with kumactl. Chapter I - Our Application
  • 13. Chapter I - Our Application kind create cluster --name=wlsm-mesh-zone kubectl cluster-info --context kind-wlsm-mesh-zone Creating a Cluster
  • 14. Chapter I - Our Application helm repo add kuma https://kumahq.github.io/charts helm repo update helm upgrade -i kuma kuma/kuma helm install --create-namespace --namespace kuma-system kuma kuma/kuma Creating a Cluster - Control Plane GUI
  • 15. Step 4 Creating a local docker registry Chapter I
  • 16. Chapter I - Our Application ./kind-with-registry.sh Creating a local docker registry
  • 17. Chapter I - Our Application docker build . --tag localhost:5001/wlsm-listener-service; docker push localhost:5001/wlsm-listener-service; Creating a local docker registry
  • 19. Chapter I - Our Application spring.r2dbc.url=r2dbc:postgresql://wlsm-database-deployment.wlsm-namespace.svc.cluster.local:5432/wlsm Going through the code wslm.url.collector=http://wlsm-collector-deployment.wlsm-namespace.svc.cluster.local:8081/api/v1/collector Listener Service Collector Service
  • 21. Chapter I - Our Application apiVersion: v1 kind: Namespace metadata: name: wlsm-namespace labels: kuma.io/sidecar-injection: enabled --- Making the deploy scripts --- apiVersion: v1 kind: Service metadata: name: wlsm-listener-deployment spec: selector: app: wlsm-listener ports: - protocol: TCP appProtocol: http port: 8080 apiVersion: apps/v1 kind: Deployment metadata: name: wlsm-listener namespace: wlsm-namespace spec: replicas: 1 selector: matchLabels: app: wlsm-listener template: metadata: labels: app: wlsm-listener spec: containers: - name: wlsm-listener-service image: localhost:5001/wlsm-listener-service:latest imagePullPolicy: Always ports: - containerPort: 8080
  • 23. Chapter I - Our Application Running the application kubectl apply -f listener-deployment.yaml --force;
  • 25. Chapter II - Exploring Kuma features MeshTrafficPermission echo "apiVersion: kuma.io/v1alpha1 kind: MeshTrafficPermission metadata: namespace: kuma-system name: mtp spec: targetRef: kind: Mesh from: - targetRef: kind: Mesh default: action: Allow" | kubectl apply -f -
  • 26. Chapter II - Exploring Kuma features Mesh echo "apiVersion: kuma.io/v1alpha1 kind: Mesh metadata: name: default spec: mtls: enabledBackend: ca-1 backends: - name: ca-1 type: builtin" | kubectl apply -f -
  • 27. Chapter II - Exploring Kuma features MeshTrafficPermission (Deny) apiVersion: kuma.io/v1alpha1 kind: MeshTrafficPermission metadata: namespace: kuma-system name: mtp spec: targetRef: kind: Mesh from: - targetRef: kind: Mesh default: action: Deny" | kubectl apply -f -
  • 28. Chapter II - Exploring Kuma features MeshTrafficPermission (Specific) echo " apiVersion: kuma.io/v1alpha1 kind: MeshTrafficPermission metadata: namespace: kuma-system name: wlsm-database spec: targetRef: kind: MeshService name: wlsm-database-deployment_wlsm-namespace_svc_5432 from: - targetRef: kind: MeshService name: wlsm-collector-deployment_wlsm-namespace_svc_8081 default: action: Allow" | kubectl apply -f -
  • 29. Chapter II - Exploring Kuma features MeshFaultInjection (Specific) echo " apiVersion: kuma.io/v1alpha1 kind: MeshFaultInjection metadata: name: default namespace: kuma-system labels: kuma.io/mesh: default # optional, defaults to `default` if it isn't configured spec: targetRef: kind: MeshService name: wlsm-collector-deployment_wlsm-namespace_svc_8081 from: - targetRef: kind: MeshService name: wlsm-listener-deployment_wlsm-namespace_svc_8080 default: http: - abort: httpStatus: 500 percentage: 50" | kubectl apply -f -
  • 30. ● Source Repository ○ https://github.com/jesperancinha/wild-life-safety-monitor Use git clone from the command prompt to download the full code base: > git clone https://github.com/jesperancinha/wild-life-safety-monitor.git You’ll be prompted for a username and password which should be your github account. The easy way: > make b > make run The manual way: > gradle build > ./gradlew run Project Location
  • 31. Resources: ● K9s ● https://support.konghq.com/support/s/article/How-to-enable-debug-logging-for-kuma-sidecar-without- using-port-forward ● https://spacelift.io/blog/kubectl-logs ● https://docs.konghq.com/mesh/latest/policies/meshtrafficpermission/ ● https://kuma.io/features/