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. ...