How to Configure K9s Config Location
The k9s config location sets where your terminal app stores view rules and cluster state. You change this path using system variables to keep work and test settings apart. By default, the app follows standard base folders on your laptop. It saves visual themes, hotkeys, and cluster state files in your home folder. Teams often move these files to custom folders to manage many clusters at once. This setup stops test rules from breaking live cluster views. How the k9s config location works When
Your coding agents run with your access.
Claude Code reaches prod with a developer's credentials, and approval prompts get clicked through. hoop.dev checks every query, masks sensitive data, and holds risky changes for a human.
The k9s config location sets where your terminal app stores view rules and cluster state. You change this path using system variables to keep work and test settings apart.
By default, the app follows standard base folders on your laptop. It saves visual themes, hotkeys, and cluster state files in your home folder. Teams often move these files to custom folders to manage many clusters at once. This setup stops test rules from breaking live cluster views.
How the k9s config location works
When you start the terminal app, it looks for its main setup folder. It checks system variables first before falling back to your user home path. This folder holds global screen rules, custom key shortcuts, and skin files. It also creates sub-folders for each Kubernetes cluster context you visit.
Every user account on a machine has its own local setup path. The app reads your standard Kubernetes access file to find cluster names. Then it matches those names to local state folders inside the main path. If you change the base path, the app builds a fresh folder tree.
A safe default is to keep read-only views enabled in your global file. You should also separate live cluster folders from local test folders. Many engineers set a dedicated path for each project in their shell profile. This keeps custom plugins and dangerous delete shortcuts away from live workloads.
How to organize paths for multiple clusters
Managing ten or more clusters from one folder often leads to mistakes. A custom plugin meant for a test cluster might show up in production. You can fix this by pointing the app to different folders per project. Shell profiles let you switch the base folder when you switch project directories.
Each project folder can hold its own plugins, hotkeys, and view rules. For production folders, you can remove shortcuts that delete pods or edit secrets. For local development folders, you can add fast restart keys and debug tools. This folder split acts as a simple guardrail on your own machine.
AWS Config Rules + End-to-End Encryption: architecture patterns and best practices
Continue reading? Get the full guide.
Free. No spam. Unsubscribe anytime.
Teams also share base templates using source control repos. Engineers pull the standard team folder and point their local app to it. You must exclude cluster state files and screen dumps from source control. Screen dumps can hold secret values or private customer emails from pod logs.
Checking and auditing local setup risks
You can check your active paths by opening the built-in info screen. The top header shows the exact folders used for settings, logs, and dumps. Security teams should ask engineers to check file permissions on these local folders. Only your own user account should have read or write rights there.
Local setup files only control how the terminal app looks on your laptop. They do not enforce real security rules on the Kubernetes cluster itself. Once a session logs in, a user can bypass read-only app settings. Anyone can run standard command tools using the same local cluster keys.
Static access files on laptops also leave long-lived keys exposed on disk. Also, the cluster only logs basic API calls by role name. It does not record who ran a shell command inside a running pod. And if someone views database records or pod env vars, raw secrets appear. Masking must rewrite matched fields like card numbers or phone numbers in results.
Add runtime guardrails and masking beside your databases and APIs
Login rules, role grants, and CI checks govern who connects to your stack. Yet any allowed script, engineer, or AI agent still runs commands with the full scope of its role. For workloads on Postgres, MySQL, SQL Server, MongoDB, ClickHouse, Kubernetes, SSH, or internal HTTP services, hoop.dev sits beside the service as an open-source proxy, a sidecar for your database or API.
Before a query runs, hoop.dev guardrails check the statement against your rules. An AI Analyzer you configure can score intent or hold risky calls for human review. Next, hoop.dev data masking rewrites sensitive fields in responses, and each verdict is logged per listener. Explore the MIT-licensed project on GitHub.
Frequently asked questions
Where does the app store files by default?
The app uses standard user config and data folders on Linux, macOS, and Windows. You can view the exact active file paths on the main startup screen.
Can I share my setup folder across my team?
Yes, you can share skin files, custom views, and plugins in source control. Never share local cluster state sub-folders or saved screen dump files with others.
Does read-only mode in the config file block all cluster changes?
No, the local read-only setting only hides delete and edit keys in the app. Your underlying Kubernetes role still controls what actions you can run with other tools.
Related guides
In this post