sofka (GitHub Repo)
Sofka is a Kubernetes terminal interface written in Rust that provides built-in Flux CD and Argo CD management without extra binaries.
Deep dive
- TUI Design: Built on
kube-rsandratatuifor asynchronous, non-blocking cluster interaction. - GitOps Integration: Native support for Flux CD and Argo CD allows suspending, resuming, and reconciling without external binaries.
- Incident Debugging: Includes a deterministic, local-only incident view that avoids AI-based analysis.
- Operational Safety: Offers configurable guardrails and a mandatory read-only mode to prevent accidental production changes.
- Flexibility: Supports extensive customization through skinning and per-context configurations.
Decoder
- TUI (Terminal User Interface): A text-based program that provides a visual interface within a terminal emulator, often used by developers for managing infrastructure.
- Flux CD / Argo CD: GitOps controllers for Kubernetes that automate the deployment of applications by synchronizing cluster state with Git repositories.
- CRD (Custom Resource Definition): An extension of the Kubernetes API that allows users to define their own custom object types.
Original article
sofka
A Kubernetes TUI written in Rust, on kube-rs and ratatui. Async everywhere, so the UI never blocks on the cluster.
sofka.rs - the website, with a watchable tour of a real session (sofka.rs/#play).
Why "sofka"
That's Sophie, a Russian Blue. She sits behind the monitor and watches the screen. Constantly, not sometimes. She has the narrow-eyed look of someone who has seen a pod in CrashLoopBackOff. She catches every state change and doesn't get distracted. She is, in effect, a cluster watchman that is a cat.
sofka is the Serbian short form of Sophia, which means "wisdom". A good cluster TUI and a good cat both watch things closely, and both know when something is wrong.
What it does
sofka is a Kubernetes terminal interface inspired by k9s. It uses a shared object pipeline. Both programs support built-in and custom resources. The main functions are:
- Custom resource browsing - one generic render pipeline, built-in columns for common kinds, NAME/AGE for the rest, and
enteron a CRD drills into its custom resources. - Flux CD built in -
tsuspends, resumes, and reconciles through native API patches. Nofluxbinary. Plus a native Helm inspector that decodes release Secrets itself. - Argo CD built in -
tsuspends, resumes, and syncs ArgoCD Applications. ApplicationSets support suspend and resume. These actions use native API patches. Noargocdbinary. - It tells you why something is broken -
Xopens a deterministic, evidence-based incident view. No AI, no external service. - Bulk actions -
spacemarks rows for delete, kill, or Flux actions across many resources at once. - Port-forwards run in the background - starting one doesn't freeze the TUI, and
:pfmanages them all. - Guardrails and read-only mode - "never delete in prod" is enforced, not remembered.
- Skins - Catppuccin, Gruvbox, Solarized, Nord, Dracula, Tokyo Night, One Dark, Rosé Pine, Rosé Pine Dawn, Monokai, Flexoki, with auto dark/light detection.
Installation
Linux packages
pkg.sofka.rs serves signed apt, dnf, zypper, pacman, and apk repositories, so your normal system upgrade keeps Sofka current.
Debian 12 or later and Ubuntu 22.04 or later:
sudo install -d -m 0755 /etc/apt/keyrings
curl -fsSL https://pkg.sofka.rs/sofka.asc | sudo tee /etc/apt/keyrings/sofka.asc > /dev/null
echo "deb [signed-by=/etc/apt/keyrings/sofka.asc] https://pkg.sofka.rs/deb stable main" | sudo tee /etc/apt/sources.list.d/sofka.list
sudo apt update
sudo apt install sofka
Fedora, RHEL, and compatible systems:
curl -fsSL https://pkg.sofka.rs/rpm/sofka.repo | sudo tee /etc/yum.repos.d/sofka.repo
sudo dnf install sofka
Other platforms
Every release ships prebuilt binaries for macOS, Linux, and Windows (aarch64/x86_64). Windows ZIP files contain sofka.exe and the license notices.
brew install nklmilojevic/sofka/sofka # Homebrew project tap (macOS/Linux)
brew install sofka # Homebrew official core tap (macOS/Linux)
nix run github:nklmilojevic/sofka # Nix, nothing to install
cargo install sofka # Cargo
On Windows, install with Scoop from its Main bucket:
scoop install sofka
macOS: "cannot be opened because the developer cannot be verified"
The release binaries aren't signed or notarized yet, so Gatekeeper refuses a tarball you downloaded in a browser. Nothing is broken. Clear the quarantine flag once:
xattr -d com.apple.quarantine sofka
Usage
Shell completion is available for Bash, Zsh, Fish, Elvish, and PowerShell.
sofka [RESOURCE] [-n NAMESPACE] [-A] [--context NAME] [--kubeconfig PATH] [--readonly | --write]
Headless modes need no TTY and double as CI smoke tests:
sofka --check # connect, run discovery, print a summary, exit
sofka pods --snapshot # render one frame of a resource view to stdout
sofka dp -A --snapshot # deployments, all namespaces
sofka info # runtime diagnostics: build, config, discovery, latency, dirs
sofka info --offline # the same report without connecting to a cluster
sofka plugin search # search the official reviewed plugin catalog
sofka plugin install ID # install the latest compatible package
sofka plugin update # explicitly update all managed packages
sofka plugin list # offline installed-package inventory
sofka import k9s # convert your k9s config, plugins, hotkeys, and views
sofka check-update # check for a newer release and print the upgrade command
Keys
| Key | Action |
|---|---|
: |
command palette |
/ |
filter |
enter / esc |
drill down / go back |
j/k, g/G |
navigate |
space |
mark row for bulk actions |
y / d / E |
YAML / describe / live events |
l / L |
logs / VictoriaLogs history |
X / T |
explain why it's unhealthy / state-change timeline |
s / e / a |
shell or scale / edit in $EDITOR / attach |
f |
port-forward |
t |
Flux/ArgoCD menu |
ctrl-d / ctrl-k |
delete / force-delete |
Configuration
Use config.toml, config.yaml, or config.yml under $XDG_CONFIG_HOME/sofka (or ~/.config/sofka).
default_namespace = "kube-system"
default_resource = "deployments"
readonly = false
favorite_namespaces = ["kube-system", "monitoring"]
[aliases]
dep = "deployments"
[skin]
name = "gruvbox-dark"
License
Dual-licensed under MIT or Apache-2.0, at your option.
Fresh dev news, AI-digested daily. Never miss a trend at devoured.fyi