K9s View Deployments

Published
Length
3 min read

Luis Felipe Dias

All posts

To use k9s view deployments, open the terminal UI and switch to the deployment resource view. This screen lists every active workload in your chosen namespace and shows live pod health. Platform teams often hand out broad cluster admin keys so developers can check these views. Wide roles let any user change live workloads or read private app data by mistake. How k9s view deployments works in your cluster The tool reads your local cluster file to log in and talk to the control plane. When you

Database View-Based Access Control: the complete guide

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

Free white paper. No spam. Unsubscribe anytime.

To use k9s view deployments, open the terminal UI and switch to the deployment resource view. This screen lists every active workload in your chosen namespace and shows live pod health. Platform teams often hand out broad cluster admin keys so developers can check these views. Wide roles let any user change live workloads or read private app data by mistake.

How k9s view deployments works in your cluster

The tool reads your local cluster file to log in and talk to the control plane. When you use k9s view deployments, the app sends a read request to the cluster API. The server checks your role rules and sends back the list of workloads. The screen updates in real time as pods start, stop, or fail.

You can pick a single workload from the list to see its pods and events. The tool also lets you read container logs or open a shell inside a running pod. Each action uses the exact same local user key stored on your laptop. If that key has write power, you can edit live manifests or delete workloads in seconds. Teams must set up role rules that match what each person needs to do.

What native cluster roles solve and what they miss

Role-based rules in Kubernetes let you limit who can read or change cluster objects. You can build a read-only role so developers can check workload status without breaking live apps. This setup stops users from deleting workloads or changing pod counts by hand. It works well for basic checks across test and prod clusters.

Still, native cluster roles only check who logs in and which resource type they touch. They cannot inspect what happens inside an active pod shell or filter sensitive log lines. Once a user gets shell permissions, the cluster cannot stop dangerous commands in flight. Standard logs also miss the full terminal output when someone runs commands inside a container. Teams also struggle to manage static local keys that sit on developer laptops for months. If a laptop is lost, anyone with that file can still log in to the cluster. Rotating those keys takes hours of manual work across the whole team.

Database View-Based Access Control: architecture patterns and best practices

Continue reading? Get the full guide.

Free. No spam. Unsubscribe anytime.

How to scope workload checks for your team

Start by removing cluster admin keys from daily developer laptops. Map each team to a specific namespace so users only see their own apps. Grant read verbs on workloads and pods while blocking write and delete actions by default. This lets engineers use the terminal UI to check app health without risking outages.

Keep pod shell and secret read permissions separate from daily read roles. When an engineer needs to fix a broken pod, grant write power for a short window. Log every API call and command so your security team can review past actions. Mask sensitive data like emails, phone numbers, card numbers, and national IDs in log streams. Rewriting matched fields in results keeps private data safe during daily debugging.

Check database and API queries on the wire

Identity tools, roles, and network rules decide who opens a session. Setup alone cannot check what each query does or mask sensitive values in a response once a session starts. When workflows touch Postgres, MySQL, SQL Server, MongoDB, ClickHouse, Kubernetes APIs, SSH, or internal HTTP APIs, hoop.dev runs beside those services as an open-source proxy, a sidecar for your Postgres or API. It inspects requests coming in and results going back on the wire.

Your login details and client tools stay as they are while hoop.dev guardrails refuse bad deletes or drops before they run. On responses, hoop.dev data masking rewrites matched sensitive values in memory. Furthermore, hoop.dev holds SOC 2 Type II, is MIT licensed, and writes every query and decision to an audit trail that generates evidence for HIPAA, GDPR, and PCI DSS. See the source on GitHub.

Frequently asked questions

How do I switch namespaces when checking workloads in K9s?

You can pick a namespace from the top menu bar or type the namespace command. Once selected, the screen filters the workload list to show only objects in that space. Your cluster role must allow read actions in that specific namespace for the list to load.

Why is my deployment list empty in the K9s terminal?

An empty list usually means you are looking at the wrong namespace or lack permissions. Check your active namespace at the top of the screen first. If the namespace is right, ask your admin to check your role bindings for read rules.

Can engineers view workload logs without edit permissions?

Yes, Kubernetes separates log reading from workload editing in its role system. You can grant read rules on pods and pod logs while blocking edit verbs on workloads. This setup lets developers debug app crashes in the terminal UI without changing live specs.

Save the open-source gateway.

hoop is MIT-licensed infrastructure for controlling how AI agents reach production data. Star hoophq/hoop so you can inspect it, deploy it, or share it when your team starts governing agent access.