VSCode Configuration to attach to a container running in a kubernetes cluster

VSCode is an amazing text editor, it offers a wide variety of features and an awesome list of extensions. One feature that I like to use is “Attach to a container in a Kubernetes cluster”, that is attaching my code to a running instance of my app running in my local kubernetes cluster. Super useful if you need to test, debug or monitor your app while it is running. I recently found myself in a situation where I had to restart the app and reattached myself to the container over and over again. It became tedious to find the pod in the Kubernetes view, right clicking on the pod once I found it to select the attach option. Having to do this over and over again prompted me to look into whether this could be easier to do via some configuration. I wanted something that would allow me to easily attach to a pod. I looked around the web and found nothing so this is what I came up with. ...

November 4, 2025 · Yunier

Consul Service Mesh in Kubernetes - Part 1

Introduction I have been spending my last few weeks sharpening up my Kubernetes skills, one area that I focused on was how to enable and use a Service Mesh in Kubernetes. A service mesh is a layer in your infrastructure that enables control of inbound and outboard traffic. It controls the traffic of any app or service that uses the network. Kubernetes offers a wide range of Service Meshes, in this blog post I am going to concentrate on HashiCorp’s service mesh offering, Consul, though you may see other refer to it as Consul Connect, Consul Connect is a set of features that were added to Consul was in 2018 to enable service mesh support. ...

May 28, 2023 · Yunier

Use Static IP In WSL

In my last post, Kubernetes In WSL - Connect to a service from Windows, I explored a few ways to connect to a Kubernetes service from the host machine, Windows. In the end of that blog post, I stated that using HostPort was the best option because at the time I did not know how to assign a static IP address to WSL. Without using a static IP address, when WSL is restarted a new IP is assigned. Having a dynamic IP made it harder for me to connect to a Kubernetes service from Windows as I would need to update all my configurations whenever a new IP was assigned to WSL. ...

December 23, 2022 · Yunier

Kubernetes In WSL - Connect to a service from Windows

Today’s post is a follow-up to my Use Kubernetes In WSL blog post, where I outlined how to install Kubernetes on WSL. As noted at the end of the post, I was having issues connecting from the host, a windows machine, to Kubernetes in WSL. Connection Issue The main issue I was facing was that I could not connect to a pod running on Kubernetes using window’s localhost. Take the following Nginx deployment obtained from the official Kubernetes documentation. ...

December 14, 2022 · Yunier

Use Kubernetes In WSL

If you find yourself in need of having to use Kubernetes in WSL, know that it is possible, hard, but possible. It might require upgrading your machine to Windows 11 if you are on Windows 10 and a few other packages. Prerequisite To get started we need to know what version of Windows you are on. This is important because Kubernetes will be installed using Microk8s, which requires having snap installed and working. Snap won’t work in older Windows builds. ...

November 3, 2022 · Yunier