faq

Frequently asked questions

Common questions about k4s, its relationship with k9s, and how to install it. Read the story or check the changelog for what's next.

About k4s

What is k4s?
k4s is an open-source terminal UI (TUI) for Kubernetes and k3s, written in Go. It surfaces the kubectl equivalent of every shortcut in the footer so users can learn the CLI while they work.
What does k4s mean?
k4s is a play on the existing Kubernetes TUIs (k9s, k3s). The "4" has no formal meaning beyond rhyming — the project leans into "kubectl by osmosis" as its real identifier.
Is k4s free and open source?
Yes. MIT-licensed. Full source at github.com/LywwKkA-aD/k4s. Contributions welcome.

k4s vs k9s

Is k4s the same as k9s?
No. k9s is a mature TUI for Kubernetes that focuses on speed and breadth of features. k4s is a smaller, opinionated tool built around the idea of teaching kubectl through use. They can coexist.
What's the difference between k4s and k9s?
The biggest difference is the kubectl footer hints — k4s prints the underlying kubectl command for every keystroke. k9s does not. k4s is also younger, has a narrower feature set, and is MIT licensed. See the full comparison.
Is k4s a fork of k9s?
No. k4s is written from scratch on Bubble Tea. It shares no code with k9s.
Should I switch from k9s to k4s?
Not unless you specifically want the kubectl-teaching angle. k9s is more mature. k4s is for people learning Kubernetes or training new joiners.

Installation

How do I install k4s on macOS?
Download the darwin_arm64 (Apple silicon) or darwin_amd64 (Intel) archive from the releases page and check it against checksums.txt, or run go install github.com/LywwKkA-aD/k4s/cmd/k4s@latest with Go 1.26+. The binaries are not notarized: if a browser downloaded the archive, run xattr -d com.apple.quarantine k4s before the first start. A Homebrew tap is planned.
How do I install k4s on Linux?
Download the linux_amd64, linux_arm64 or linux_armv7 (Raspberry Pi) archive from the releases page and check it against checksums.txt, or use the same go install command. .deb and .rpm packages are on the roadmap.
Does k4s work on Windows?
Yes. Since v1.1.5 every release ships a windows_amd64 zip, and people run k4s in Windows Terminal. Windows is not part of the maintainers' own test runs yet. On Windows k4s cannot detect the terminal background, so it assumes a dark theme; on a light scheme set K4S_THEME=light (PowerShell: $env:K4S_THEME = 'light').
The colours are hard to read in my terminal. What can I do?
Since v1.1.5 k4s detects whether the terminal background is dark or light and every text colour has at least 4.5:1 contrast on common themes such as Solarized Dark and Light. Force a variant with K4S_THEME=dark or K4S_THEME=light, or drop colour entirely with NO_COLOR=1 (or K4S_THEME=mono): the selected row, warnings and errors are then marked with bold, underline and reverse video.
Does k4s require kubectl on PATH?
Only for exec and the "coming soon" Homebrew install. Pure TUI usage (lists, describe, logs, top) goes through client-go directly and does not need kubectl installed.

Compatibility

Can I use k4s with k3s?
Yes. k4s works against any cluster reachable via kubeconfig — k3s, k8s, EKS, GKE, AKS, Kind, Minikube, Rancher Desktop, OrbStack, anything that speaks the Kubernetes API.
Does k4s support multiple kubeconfig contexts?
Yes. Press :ctx to switch between contexts. k4s drops stale navigation history when you switch — list views are rebuilt against the new cluster.
Which Kubernetes versions does k4s support?
k4s is built against client-go v0.36 (the Kubernetes 1.36 API) and only uses the GA core/v1 and apps/v1 APIs, plus metrics.k8s.io/v1beta1 (served by metrics-server, needed only for top). Any currently supported Kubernetes release should work. Day-to-day testing runs on k3s.

Port-forward (v1.1.0+)

How do I port-forward a service in k4s?
Open :svc (or :pods / :deploy), move to the row, press f. A centred popup asks for local:remote with a smart default — privileged remote ports (80, 443, …) become 8080, 8443 to avoid the bind: permission denied trap. Press Enter and the forward starts; k4s drops you on the :pf view so you can confirm it's running.
Do port-forwards survive when I quit k4s?
The live SPDY tunnels live inside the k4s process, so they end when you quit. But every forward you've ever declared is saved to $XDG_STATE_HOME/k4s/portforwards.json (default ~/.local/state/k4s/). On the next launch k4s asks: "Found N saved forwards from a previous session — revive all?" — one keystroke (y / Enter) brings them all back.
k4s port-forward says "permission denied". What now?
Local ports below 1024 (80, 443, 22…) need root on macOS/Linux. k4s pre-checks the port before persisting anything, so the error appears immediately in the command-bar — usually "permission denied binding local port 80 (ports < 1024 need root — try 8080)". Pick a port ≥ 1024 and the forward starts.
Can I tail logs of every pod behind a service?
Yes — since v1.1.1. Press l on a service row in :svc and k4s resolves the label selector, opens the multi-pod logs view across every replica. Same flow as pressing l on a deployment.
Does k4s need kubectl to port-forward?
No. The forward runs in-process via k8s.io/client-go/tools/portforward with an SPDY dialer built from your kubeconfig's REST config. kubectl on PATH is only needed for e (exec into a pod).

Design

What is "kubectl by osmosis"?
It's the design idea behind k4s. Every TUI action shows you the kubectl command it would have run in the footer. Use the TUI for speed; absorb the CLI as a side-effect. More on the why page.
Why is the binary about 28 MB?
Most of it is client-go and its transitive dependencies. Static Go binaries trade size for zero runtime requirements. Release binaries are stripped and come to about 28 MB (archives 8–10 MB); a go install build keeps its symbol table and is about 40 MB.

Question not answered?

Open an issue on GitHub or start a discussion. We answer everything.

go install github.com/LywwKkA-aD/k4s/cmd/k4s@latest