Connecting to clusters

There is nothing to add inside Barney. It reads your kubeconfig and shows every context in it.
Which kubeconfig
Barney reads ~/.kube/config. If KUBECONFIG is set, it reads the first file in it; other files listed after it are not merged yet.
Use Reload kubeconfig & ping clusters on the picker after you add a cluster from Terminal.
Authentication
Barney authenticates the way kubectl does:
| In your kubeconfig | What Barney does |
|---|---|
| Client certificate and key | Uses them for TLS. RSA and ECDSA keys in any PEM form work |
token or tokenFile | Sends it as a bearer token |
exec plugin (aws, gke-gcloud-auth-plugin, kubelogin, …) | Runs the plugin only to get a token, then caches it until it expires |
Exec plugins are found on your shell's PATH (Homebrew, asdf, the cloud SDK installers), so a plugin that works in Terminal works here. When a token expires mid-session, requests, watches and log streams get a fresh one and carry on.
The cluster's certificate authority comes from the kubeconfig, and the server's host name is checked against its certificate. insecure-skip-tls-verify: true is honored when it is set.
The cluster picker
Each context gets a card:
- Provider (EKS, GKE, AKS, DigitalOcean, minikube, kind…) and the auth method.
- A live ping: whether the API answered, the Kubernetes version and the round trip. The fastest one is stamped LEGENDARY; a cluster that does not answer says why.
- When you last opened it.
- An environment badge read from the context name.
Environment badges
Barney looks for these words in the context name, split on -, _, ., / and spaces:
| Badge | Words |
|---|---|
| PROD (red) | prd, prod, production, prods, live |
| STG | stg, stag, staging, stage |
| HML | hml, hmg, homolog, homologacao, homologation |
| QA | qa, test, tst, testing |
| UAT | uat |
| DEV | dev, develop, development, devel |
The badge shows on the card and on the cluster's tab. Name your contexts with these words and production is impossible to miss.
Pinning
Click the star (Pin to top) on the clusters you use most. Pinned clusters come first. Filter clusters narrows a long list.
Several clusters at once
Each cluster opens in its own tab, with its own live state. Open another cluster goes back to the picker without closing the ones you have, so port forwards keep running; Back to workspace returns.