All posts

Kubectl pgcli: The Fastest Way to Query Postgres in Kubernetes

The first time I typed kubectl pgcli, I felt like I had unlocked a hidden superpower. One command, and suddenly I could explore a live Postgres database running inside my Kubernetes cluster without fumbling through tunnels, proxies, or manual workarounds. Fast. Clean. Direct. Most Kubernetes workflows bury database access behind layers of scripts and config. You exec into a pod, run psql, forget the connection string, hop out, start over. But kubectl pgcli turns that into a one-step gateway, le

Free White Paper

Just-in-Time Access + Kubernetes RBAC: The Complete Guide

Architecture patterns, implementation strategies, and security best practices. Delivered to your inbox.

Free. No spam. Unsubscribe anytime.

The first time I typed kubectl pgcli, I felt like I had unlocked a hidden superpower. One command, and suddenly I could explore a live Postgres database running inside my Kubernetes cluster without fumbling through tunnels, proxies, or manual workarounds. Fast. Clean. Direct.

Most Kubernetes workflows bury database access behind layers of scripts and config. You exec into a pod, run psql, forget the connection string, hop out, start over. But kubectl pgcli turns that into a one-step gateway, letting you query, inspect, and debug Postgres with the comfort of a modern CLI—syntax highlighting, autocomplete, and everything at your fingertips.

The beauty is in the pairing. Kubectl already gives you full cluster control. Pgcli brings an elegant Postgres experience to the terminal. Together, kubectl pgcli means no guesswork, no copy-paste chaos, no fragile port-forwards. You point it at your StatefulSet, and you are in.

Continue reading? Get the full guide.

Just-in-Time Access + Kubernetes RBAC: Architecture Patterns & Best Practices

Free. No spam. Unsubscribe anytime.

Under the hood, this works by combining Kubernetes exec commands with the pgcli binary, connected directly to the database container. You interact in real time, even against production (if you really have to—be careful). Because you’re running inside the pod context, you skip network ACL headaches and DNS gymnastics.

If you’ve ever had to debug a migration, inspect a schema, or pull live metrics, you know the clock is ticking while you dig through YAMLs and Helm releases to find credentials. kubectl pgcli cuts that path to seconds. That speed compounds. Teams using it spend far less time on environment plumbing and far more time fixing real issues.

You can install pgcli locally, grab your kubectl context, and wire it up with a single alias. Or, if you want zero setup and a live version running in minutes, try it directly in a prebuilt Kubernetes workspace. Hoop.dev gives you a fresh cluster with Postgres inside, ready for kubectl pgcli without touching your laptop. It’s the shortest path from command to insight.

See it live on hoop.dev and feel it yourself—jump straight from cluster to query with nothing in the way.

Get started

See hoop.dev in action

One gateway for every database, container, and AI agent. Deploy in minutes.

Get a demoMore posts