Kubernetes tricks

A collection of nice to haves while managing applications in kubernetes.

Kubectl proxy

Running kubectl proxy will open a tunnel to the selected cluster. You can then access the webapi on the port that was displayed.

Using that webapi you can browse the resources and even access the application hosted within your cluster.

Explore a namespace

Enter the following address and replace the namespace name and the resource type (pods|services) to get a list of the available resources.http://localhost:8001/api/v1/namespaces//

Make a request to a service or pod

The url pattern looks like this: http://localhost:8001/api/v1/namespaces///::/proxy/Example: http://localhost:8001/api/v1/namespaces/hangfire-services/services/http:hangfire-services:80/proxy/hangfire will make a request to my hangfire dashboard.