Kubernetes port-forwarding for dev

Hey everybody, thanks for signing up for my email list. I’m going to try to send something out at least weekly.

This first newsletter I want to highlight a very useful Kubernetes feature that I started leveraging recently: port forwarding.

You can bind a port from a kubernetes cluster to your development machine you can hit private endpoints on your kubernetes cluster.

In the past week I’ve used it to access private endpoints and leverage a datadog agent that was on a cluster but not on my local development machine.

Here’s an example of how to do it:

$ kubectl get pods -A
...
$ kubectl port-forward <pod-name> <local port>:<remote port>

Now, whenever you hit localhost:, you’ll be hitting the container in your cluster.

For more information, see the documentation.


Join the 80/20 DevOps Newsletter

If you're an engineering leader or developer, you should subscribe to my 80/20 DevOps Newsletter. Give me 1 minute of your day, and I'll teach you essential DevOps skills. I cover topics like Kubernetes, AWS, Infrastructure as Code, and more.

Not sure yet? Check out the archive.

Unsubscribe at any time.