Introducing a new way to review your PRs.

Read the announcement

hcavarsan / kftray

kubectl port-forward manager and reverse tunnel (ngrok-like) for exposing local services publicly, with TLS termination, HTTP traffic inspection, UDP forwarding, multi-hop proxy routing through k8s clusters, stateful config via filesystem or git - GUI and TUI available

View on GitHub

19 documents · Updated Nov 23, 2026

overview

Knowledge Base updated: 2026-11-22

kftray knowledge base

Orientation

kftray is a Rust workspace for managing Kubernetes and SSH port forwards through a Tauri desktop application, a terminal UI, and service-facing executables.

The desktop product combines kftray-tauri native capabilities with the React/Vite frontend. Forwarding lifecycle, endpoint exposure, and privileged binding live in workspace crates shared by the desktop and terminal experiences.

Critical configuration and domain state are defined in kftray-commons; runtime connection state is coordinated by the forwarding subsystem and consumed by desktop, terminal, MCP, and proxy components.

System map

flowchart TD
  User[User] --> Desktop[Desktop application]
  User --> Terminal[Terminal experience]
  Client[External client] --> MCP[MCP service]
  Client --> Proxy[Proxy server]
  Desktop --> Native[Native desktop orchestration]
  Desktop --> Frontend[Desktop frontend]
  Desktop --> Config[Configuration workflows]
  Native --> Common[Shared domain platform]
  Terminal --> Common
  MCP --> Common
  Proxy --> Common
  Config --> Common
  Common --> Forwarding[Connection forwarding]
  Forwarding --> K8s[Kubernetes port forwarding]
  Forwarding --> SSH[SSH forwarding]
  Forwarding --> Exposure[Endpoint exposure and TLS]
  Desktop --> Observability[Observability and user controls]
flowchart LR
  Config[Configuration] --> State[Shared configuration state]
  State --> Forwarding[Forwarding lifecycle]
  Forwarding --> Local[Local listener]
  Local --> Target[Kubernetes, SSH, or exposed target]
  Forwarding --> Logs[HTTP logging and monitoring]

Glossary

  • kftray-tauri: The native Tauri application that hosts the desktop UI and exposes native commands.
  • kftui: The terminal user interface for operating forwarding workflows.
  • Expose: Functionality that makes a forwarded endpoint available beyond its default local listener.
  • MCP service: The Model Context Protocol server that exposes kftray operations to MCP clients.
  • Shared configuration state: Common configuration and runtime concepts provided by kftray-commons.

Invariants

  • Shared configuration contracts must remain compatible across consumers; evidence: crates/kftray-commons/src/** is used as the common domain layer.
  • Native UI-to-service operations pass through the Tauri command boundary; evidence: crates/kftray-tauri/src/commands/**.
  • Forwarded endpoint lifecycle concerns belong in the forwarding subsystem rather than individual UIs; evidence: crates/kftray-portforward/src/**.
  • External MCP and proxy interfaces must use shared domain concepts rather than duplicate configuration models; evidence: crates/kftray-mcp/src/**, crates/kftray-server/src/**, and crates/kftray-commons/src/**.
  • Observability and user-control features remain opt-in or explicitly user-driven where applicable; evidence: crates/kftray-tauri/src/** telemetry and shortcut handling patterns.

Routing table