A K9s plugin that integrates Komodor's Root Cause Analysis directly into your Kubernetes workflow. Trigger RCA analysis for any Kubernetes resource with Shift-K while browsing your cluster.
- Komodor Account: Sign up at komodor.com
 - API Key: Generate from Komodor dashboard → Settings → API Keys
 - K9s: Install from k9scli.io
 
For the plugin to work, K9s must find the plugin configuration file. K9s looks for plugins in:
$XDG_CONFIG_HOME/k9s/plugins.yaml(ifXDG_CONFIG_HOMEis set)~/.config/k9s/plugins.yaml(default)
If you have issues, set XDG_CONFIG_HOME:
export XDG_CONFIG_HOME="$HOME/.config"Add this to your ~/.bashrc or ~/.zshrc to make it permanent.
# Add the tap and install
brew tap komodorio/k9s-rca https://github.com/komodorio/k9s-rca
brew install k9s-rca
# Copy plugin configuration to k9s (REQUIRED)
mkdir -p ~/.config/k9s
cp $(brew --prefix)/share/k9s-rca/k9s_rca_plugin.yaml ~/.config/k9s/plugins.yaml
# Restart k9s if it's running
pkill k9sDownload from GitHub Releases:
# Download and extract (replace VERSION, OS, and ARCH as needed)
VERSION=1.0.0
OS=darwin  # or linux, windows
ARCH=arm64 # or amd64
curl -L -o k9s-rca.tar.gz "https://github.com/komodorio/k9s-rca/releases/download/v${VERSION}/k9s-rca-${VERSION}-${OS}-${ARCH}.tar.gz"
tar -xzf k9s-rca.tar.gz
# Install binary
sudo mv k9s-rca /usr/local/bin/
# Copy plugin configuration (REQUIRED)
mkdir -p ~/.config/k9s
mv k9s_rca_plugin.yaml ~/.config/k9s/plugins.yaml
# Restart k9s if it's running
pkill k9sgit clone https://github.com/komodorio/k9s-rca.git
cd k9s-rca
make install-plugin  # Builds binary and copies plugin configSet your Komodor API key using either method:
Environment Variable:
export KOMODOR_API_KEY="your-api-key-here"Add to your shell profile (~/.bashrc, ~/.zshrc, etc.) to persist across sessions.
.env File:
Create a .env file in your project directory or ~/.k9s-komodor-rca/.env:
KOMODOR_API_KEY=your-api-key-hereThe plugin automatically detects and matches your cluster name with Komodor. In rare cases where auto-detection fails, you can manually configure cluster name mapping by creating ~/.k9s-komodor-rca/clusters.yaml:
mapping:
  "local-cluster-name": "komodor-cluster-name"- Open K9s: 
k9s - Navigate to any resource (
:po,:deploy,:svc, etc.) - Select a resource with arrow keys
 - Press 
Shift-Kto trigger RCA 
Pods, Deployments, Services, StatefulSets, DaemonSets, Ingress, ConfigMaps, Secrets, PersistentVolumeClaims, Jobs, CronJobs, ReplicaSets, HorizontalPodAutoscalers, PodDisruptionBudgets, NetworkPolicies
k9s-rca --helpAvailable flags:
--kind: Resource kind (Pod, Deployment, etc.)--namespace: Namespace--name: Resource name--api-key: Komodor API key (overrides env var)--cluster: Cluster name--base-url: API base URL (default: https://api.komodor.com)--poll: Monitor RCA completion--background: Run without TUI--debug: Enable debug logging to~/.k9s-komodor-rca/k9s_komodor_logs.txt
Plugin not loading:
The plugin configuration MUST be in the correct location for K9s to find it.
# Check if XDG_CONFIG_HOME is set
echo $XDG_CONFIG_HOME
# If not set, set it and add to your shell profile
export XDG_CONFIG_HOME="$HOME/.config"
echo 'export XDG_CONFIG_HOME="$HOME/.config"' >> ~/.zshrc  # or ~/.bashrc
# Verify plugin config exists
ls -la ~/.config/k9s/plugins.yaml
# Restart k9s completely
pkill k9s
k9sBinary not found:
which k9s-rca
echo 'export PATH="$HOME/.local/bin:$PATH"' >> ~/.zshrc
source ~/.zshrcAPI errors:
Check logs with --debug flag or view ~/.k9s-komodor-rca/k9s_komodor_logs.txt
git clone https://github.com/komodorio/k9s-rca.git
cd k9s-rca
make build          # Build binary
make test           # Run tests
make install        # Install to ~/.local/bin
make clean          # Clean build artifactsMIT License - See LICENSE file for details.
Documentation: Komodor Help Center
