SlideShare a Scribd company logo
1 of 34
Download to read offline
Debugging Microservices "Remocally"
in Kubernetes with Telepresence
Daniel Bryant
@danielbryantuk
@danielbryantuk
tl;dr
2
• The inner development loop can be painful with microservices & Kubernetes
• Telepresence “proxies” your local machine into the cluster, increasing fast feedback
• Telepresence enables remote-to-local “remocal” development
• Telepresence supports several workflows to make you more productive
• Please support this CNCF project — get involved!
@danielbryantuk
3
Setting the Scene
4
@danielbryantuk
Inner and outer dev loops
5
Hat tip to Mitch Denny (now 404): https://mitchdenny.com/the-inner-loop/
http://jorgemoral.es/posts/2020_03_17-develop_apps…
@danielbryantuk
SOA: There’s just more stu
ff
(and dependencies)
6
@danielbryantuk
So, let’s run everything locally…
7
@danielbryantuk
tl;dr
8
“My laptop only has 16GB
RAM and you’re asking it
to run Kubernetes and a
JVM and a database???”
@danielbryantuk
Okay, let’s run everything remotely…
9
@danielbryantuk
Inner and outer dev loops with K8s
can be the same
10
• Write code
• Build container
• Push to registry
• Deploy to cluster
• Test
And can be …. SLOW.
@danielbryantuk
Automation can help…
11
@danielbryantuk
tl;dr
12
But you want a really fast inner loop (no docker build/push) …
@danielbryantuk
tl;dr
13 And you want to use your own tools.
@danielbryantuk
tl;dr
14
And you want to avoid the “works on my machine”
production vs local dev debacle
@danielbryantuk
15
@danielbryantuk
What is Telepresence
16
• “Fancy Kubernetes VPN for development”
• “kubectl port-forward on steroids”
• “kubectl proxy all-the-things”
• A network bridge between your laptop and the Kubernetes cluster
@danielbryantuk
Telepresence: Local-to-Remote bridge
17
@danielbryantuk
Telepresence: Local-to-Remote bridge
18
www.youtube.com/watch?v=W_a3aErN3NU
Demo Time!
19
@danielbryantuk
Telepresence: Local-to-Remote bridge
20
telepresence connect
• Open a tunnel to the remote cluster; exposes “in-cluster” services/network/DNS
telepresence intercept my-service —port 3000
• Re-routes (intercepts) tra
ff
ic to my-service in the remote cluster to my local machine
telepresence login & telepresence intercept
• Create preview URL to isolate and share results of the intercept
@danielbryantuk
Telepresence: Local-to-Remote bridge
$ telepresence intercept dataprocessingnodeservice --port 3000
21
Using deployment dataprocessingnodeservice
intercepted
State : ACTIVE
Destination : 127.0.0.1:3000
Intercepting: HTTP requests that match all of:
header("x-telepresence-intercept-id") ~= regexp ("76a1e848-1829-74x-1138-e3294c1e9119:dataprocessingnodeservice")
Preview URL : https://[random-subdomain].preview.edgestack.me
www.youtube.com/watch?v=W_a3aErN3NU
@danielbryantuk
Preview URLs, Personal Intercepts
22
Docker Desktop Extension for Telepresence
23
getambassador.io/testing-with-telepresence-and-docker
24
The Good, the Bad, and the
“Don’t Try this at Home”
25
@danielbryantuk
Benefits
26
• Use any tool that runs on your laptop: IDE, profiler, debugger, …
• Connect to cloud-based resources
• Same network namespace (e.g., curl and ping work)
• Very fast inner loop!
@danielbryantuk
Requirements
27
• Network connection
• kubectl access to cluster
• Supports all modern OSs: Mac, Linux, or Windows Native/WSL2
• A cooperative VPN!
https://blog.getambassador.io/implementing-telepresence-networking-with-a-tun-device-a23a786d51e9
@danielbryantuk
28
@danielbryantuk
tl;dr
29
• Capturing DNS and routing selectively to the
cluster is tricky
• Maintaining proxy connections can be
challenging
• Kubernetes has many resource types
• No two laptops are alike
• No two clusters are alike
• And more
@danielbryantuk
Telepresence is a CNCF project, with a wide variety of users
30
Wrapping up
31
@danielbryantuk
Conclusion
32
• The inner development loop can be painful with microservices & Kubernetes
• Telepresence “proxies” your local machine into the cluster, increasing fast feedback
• Telepresence enables remote-to-local “remocal” development
• Telepresence supports several workflows to make you more productive
• Please support this CNCF project — get involved!
@danielbryantuk
Thank you! Questions?
33
getambassador.io/products/telepresence
getambassador.io/testing-with-telepresence-and-docker
Easy Debugging of Spring Boot Microservices Running on
Kubernetes
AL Developer O
ff
ice Hours
db@datawire.io / @danielbryantuk
@danielbryantuk
Contributing to Telepresence
34
• Documentation and workflows
• Explain how you integrate Telepresence into your development workflow
• Let us know if you’re a user!
• Triage
• Lots of folks use GitHub for support, which doesn’t scale well
• Join Slack to help other users https://a8r.io/slack #telepresence

More Related Content

Similar to KubeCrash 22: Debugging Microservices "Remocally" in Kubernetes with Telepresence

Similar to KubeCrash 22: Debugging Microservices "Remocally" in Kubernetes with Telepresence (20)

Building Microservice Systems Without Cooking Your Laptop: Going “Remocal” wi...
Building Microservice Systems Without Cooking Your Laptop: Going “Remocal” wi...Building Microservice Systems Without Cooking Your Laptop: Going “Remocal” wi...
Building Microservice Systems Without Cooking Your Laptop: Going “Remocal” wi...
 
Building Microservice Systems Without Cooking Your Laptop: Going “Remocal” wi...
Building Microservice Systems Without Cooking Your Laptop: Going “Remocal” wi...Building Microservice Systems Without Cooking Your Laptop: Going “Remocal” wi...
Building Microservice Systems Without Cooking Your Laptop: Going “Remocal” wi...
 
Telepresence - Fast Development Workflows for Kubernetes
Telepresence - Fast Development Workflows for KubernetesTelepresence - Fast Development Workflows for Kubernetes
Telepresence - Fast Development Workflows for Kubernetes
 
FreeSWITCH as a Microservice
FreeSWITCH as a MicroserviceFreeSWITCH as a Microservice
FreeSWITCH as a Microservice
 
JAX London 2021: Jumpstart Your Cloud Native Development: An Overview of Prac...
JAX London 2021: Jumpstart Your Cloud Native Development: An Overview of Prac...JAX London 2021: Jumpstart Your Cloud Native Development: An Overview of Prac...
JAX London 2021: Jumpstart Your Cloud Native Development: An Overview of Prac...
 
Cloud native development without the toil
Cloud native development without the toilCloud native development without the toil
Cloud native development without the toil
 
GOTOpia 2/2021 "Cloud Native Development Without the Toil: An Overview of Pra...
GOTOpia 2/2021 "Cloud Native Development Without the Toil: An Overview of Pra...GOTOpia 2/2021 "Cloud Native Development Without the Toil: An Overview of Pra...
GOTOpia 2/2021 "Cloud Native Development Without the Toil: An Overview of Pra...
 
20150425 experimenting with openstack sahara on docker
20150425 experimenting with openstack sahara on docker20150425 experimenting with openstack sahara on docker
20150425 experimenting with openstack sahara on docker
 
Sobanski odl summit_2015
Sobanski odl summit_2015Sobanski odl summit_2015
Sobanski odl summit_2015
 
K8s debugging talk
K8s debugging talkK8s debugging talk
K8s debugging talk
 
"Project Tye to Tie .NET Microservices", Oleg Karasik
"Project Tye to Tie .NET Microservices", Oleg Karasik"Project Tye to Tie .NET Microservices", Oleg Karasik
"Project Tye to Tie .NET Microservices", Oleg Karasik
 
Orchestrating Docker with Terraform and Consul by Mitchell Hashimoto
Orchestrating Docker with Terraform and Consul by Mitchell Hashimoto Orchestrating Docker with Terraform and Consul by Mitchell Hashimoto
Orchestrating Docker with Terraform and Consul by Mitchell Hashimoto
 
Remote debugging of Application in Kubernetes
Remote debugging of Application in KubernetesRemote debugging of Application in Kubernetes
Remote debugging of Application in Kubernetes
 
What's New in Docker - February 2017
What's New in Docker - February 2017What's New in Docker - February 2017
What's New in Docker - February 2017
 
DockerCon 16 General Session Day 1
DockerCon 16 General Session Day 1DockerCon 16 General Session Day 1
DockerCon 16 General Session Day 1
 
Dockerizing the Hard Services: Neutron and Nova
Dockerizing the Hard Services: Neutron and NovaDockerizing the Hard Services: Neutron and Nova
Dockerizing the Hard Services: Neutron and Nova
 
Continuos Integration and Delivery: from Zero to Hero with TeamCity, Docker a...
Continuos Integration and Delivery: from Zero to Hero with TeamCity, Docker a...Continuos Integration and Delivery: from Zero to Hero with TeamCity, Docker a...
Continuos Integration and Delivery: from Zero to Hero with TeamCity, Docker a...
 
Scaling OpenStack Networking Beyond 4000 Nodes with Dragonflow - Eshed Gal-Or...
Scaling OpenStack Networking Beyond 4000 Nodes with Dragonflow - Eshed Gal-Or...Scaling OpenStack Networking Beyond 4000 Nodes with Dragonflow - Eshed Gal-Or...
Scaling OpenStack Networking Beyond 4000 Nodes with Dragonflow - Eshed Gal-Or...
 
Running Kubernetes in Production: A Million Ways to Crash Your Cluster - DevO...
Running Kubernetes in Production: A Million Ways to Crash Your Cluster - DevO...Running Kubernetes in Production: A Million Ways to Crash Your Cluster - DevO...
Running Kubernetes in Production: A Million Ways to Crash Your Cluster - DevO...
 
[KubeCon NA 2018] Telepresence Deep Dive Session - Rafael Schloming & Luke Sh...
[KubeCon NA 2018] Telepresence Deep Dive Session - Rafael Schloming & Luke Sh...[KubeCon NA 2018] Telepresence Deep Dive Session - Rafael Schloming & Luke Sh...
[KubeCon NA 2018] Telepresence Deep Dive Session - Rafael Schloming & Luke Sh...
 

More from Daniel Bryant

SACON EU 2019 "API Gateways and Service Meshes: Opening the Door to Applicati...
SACON EU 2019 "API Gateways and Service Meshes: Opening the Door to Applicati...SACON EU 2019 "API Gateways and Service Meshes: Opening the Door to Applicati...
SACON EU 2019 "API Gateways and Service Meshes: Opening the Door to Applicati...
Daniel Bryant
 

More from Daniel Bryant (19)

ITKonekt 2023: The Busy Platform Engineers Guide to API Gateways
ITKonekt 2023: The Busy Platform Engineers Guide to API GatewaysITKonekt 2023: The Busy Platform Engineers Guide to API Gateways
ITKonekt 2023: The Busy Platform Engineers Guide to API Gateways
 
PlatformCon 23: "The Busy Platform Engineers Guide to API Gateways"
PlatformCon 23: "The Busy Platform Engineers Guide to API Gateways"PlatformCon 23: "The Busy Platform Engineers Guide to API Gateways"
PlatformCon 23: "The Busy Platform Engineers Guide to API Gateways"
 
DevRelCon 2022: "Is Product Led Growth (PLG) the “DevOps” of the DevRel World"
DevRelCon 2022: "Is Product Led Growth (PLG) the “DevOps” of the DevRel World"DevRelCon 2022: "Is Product Led Growth (PLG) the “DevOps” of the DevRel World"
DevRelCon 2022: "Is Product Led Growth (PLG) the “DevOps” of the DevRel World"
 
Fall 22: "From Kubernetes to PaaS to... err, what's next"
Fall 22: "From Kubernetes to PaaS to... err, what's next"Fall 22: "From Kubernetes to PaaS to... err, what's next"
Fall 22: "From Kubernetes to PaaS to... err, what's next"
 
CloudBuilders 2022: "The Past, Present, and Future of Cloud Native API Gateways"
CloudBuilders 2022: "The Past, Present, and Future of Cloud Native API Gateways"CloudBuilders 2022: "The Past, Present, and Future of Cloud Native API Gateways"
CloudBuilders 2022: "The Past, Present, and Future of Cloud Native API Gateways"
 
KubeCon EU 2022: From Kubernetes to PaaS to Err What's Next
KubeCon EU 2022: From Kubernetes to PaaS to Err What's NextKubeCon EU 2022: From Kubernetes to PaaS to Err What's Next
KubeCon EU 2022: From Kubernetes to PaaS to Err What's Next
 
DevXDay KubeCon NA 2021: "From Kubernetes to PaaS to Developer Control Planes"
DevXDay KubeCon NA 2021: "From Kubernetes to PaaS to Developer Control Planes"DevXDay KubeCon NA 2021: "From Kubernetes to PaaS to Developer Control Planes"
DevXDay KubeCon NA 2021: "From Kubernetes to PaaS to Developer Control Planes"
 
Canadian CNCF: "Emissary-ingress 101: An introduction to the CNCF incubation-...
Canadian CNCF: "Emissary-ingress 101: An introduction to the CNCF incubation-...Canadian CNCF: "Emissary-ingress 101: An introduction to the CNCF incubation-...
Canadian CNCF: "Emissary-ingress 101: An introduction to the CNCF incubation-...
 
HashiCorp Webinar: "Getting started with Ambassador and Consul on Kubernetes ...
HashiCorp Webinar: "Getting started with Ambassador and Consul on Kubernetes ...HashiCorp Webinar: "Getting started with Ambassador and Consul on Kubernetes ...
HashiCorp Webinar: "Getting started with Ambassador and Consul on Kubernetes ...
 
Ambassador Fest: "Kubernetes Workflow 101: The Big Picture of Idea to an API ...
Ambassador Fest: "Kubernetes Workflow 101: The Big Picture of Idea to an API ...Ambassador Fest: "Kubernetes Workflow 101: The Big Picture of Idea to an API ...
Ambassador Fest: "Kubernetes Workflow 101: The Big Picture of Idea to an API ...
 
ADDO 2020: "The past, present, and future of cloud native API gateways"
ADDO 2020: "The past, present, and future of cloud native API gateways"ADDO 2020: "The past, present, and future of cloud native API gateways"
ADDO 2020: "The past, present, and future of cloud native API gateways"
 
GOTOpia 2020: "The Past, Present, and Future of Cloud Native API Gateways"
GOTOpia 2020: "The Past, Present, and Future of Cloud Native API Gateways"GOTOpia 2020: "The Past, Present, and Future of Cloud Native API Gateways"
GOTOpia 2020: "The Past, Present, and Future of Cloud Native API Gateways"
 
SoftwareCircus 2020 "The Past, Present, and Future of Cloud Native API Gateways"
SoftwareCircus 2020 "The Past, Present, and Future of Cloud Native API Gateways"SoftwareCircus 2020 "The Past, Present, and Future of Cloud Native API Gateways"
SoftwareCircus 2020 "The Past, Present, and Future of Cloud Native API Gateways"
 
DevOpsCon 2020: The Past, Present, and Future of Cloud Native API Gateways
DevOpsCon 2020: The Past, Present, and Future of Cloud Native API GatewaysDevOpsCon 2020: The Past, Present, and Future of Cloud Native API Gateways
DevOpsCon 2020: The Past, Present, and Future of Cloud Native API Gateways
 
AllTheTalks 2020: "The Past, Present, and Future of Cloud Native API Gateways"
AllTheTalks 2020: "The Past, Present, and Future of Cloud Native API Gateways"AllTheTalks 2020: "The Past, Present, and Future of Cloud Native API Gateways"
AllTheTalks 2020: "The Past, Present, and Future of Cloud Native API Gateways"
 
[DW Webinar] Effective Management of APIs and the Edge when Adopting Kubernetes
[DW Webinar] Effective Management of APIs and the Edge when Adopting Kubernetes[DW Webinar] Effective Management of APIs and the Edge when Adopting Kubernetes
[DW Webinar] Effective Management of APIs and the Edge when Adopting Kubernetes
 
SACON EU 2019 "API Gateways and Service Meshes: Opening the Door to Applicati...
SACON EU 2019 "API Gateways and Service Meshes: Opening the Door to Applicati...SACON EU 2019 "API Gateways and Service Meshes: Opening the Door to Applicati...
SACON EU 2019 "API Gateways and Service Meshes: Opening the Door to Applicati...
 
JAX London 2019 "Cloud Native Communication: Using an API Gateway and Service...
JAX London 2019 "Cloud Native Communication: Using an API Gateway and Service...JAX London 2019 "Cloud Native Communication: Using an API Gateway and Service...
JAX London 2019 "Cloud Native Communication: Using an API Gateway and Service...
 
[SC London] "Testing Microservices: from Development to Production
[SC London] "Testing Microservices: from Development to Production[SC London] "Testing Microservices: from Development to Production
[SC London] "Testing Microservices: from Development to Production
 

Recently uploaded

Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Safe Software
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
Joaquim Jorge
 

Recently uploaded (20)

Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Script
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
 
Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivity
 
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUnderstanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
 
AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of Terraform
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century education
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
 
Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024
 
GenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdfGenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdf
 
A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?
 

KubeCrash 22: Debugging Microservices "Remocally" in Kubernetes with Telepresence