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.


Master GitHub Actions with a Senior Infrastructure Engineer

As a senior staff infrastructure engineer, I share exclusive, behind-the-scenes insights that you won't find anywhere else. Get the strategies and techniques I've used to save companies $500k in CI costs and transform teams with GitOps best practices—delivered straight to your inbox.

Not sure yet? Check out the archive.

Unsubscribe at any time.