kportal logo

Kubernetes Port-Forward
Manager

Terminal interface for managing multiple Kubernetes port-forwards with auto-reconnect, hot-reload, health monitoring, and mDNS hostnames.

Version License Go Report
kportal terminal interface

Features

Everything you need for production-grade port-forwarding

Interactive TUI

Beautiful terminal interface with real-time updates and keyboard navigation

Live Management

Add, edit, delete, and toggle port-forwards without restarting

Auto-Reconnect

Exponential backoff retry with infinite retries on connection failures

Hot-Reload

Configuration changes applied automatically without restart

Health Monitoring

Multiple check methods with stale connection detection

mDNS Hostnames

Access forwards via .local hostnames without /etc/hosts

Multi-Context

Manage forwards across multiple clusters and namespaces

Pod Restart Handling

Automatic reconnection when pods restart or reschedule

Port Conflict Detection

Validates port availability with process ID information

HTTP Traffic Logging

Real-time HTTP logging with detail view, JSON highlighting, gzip decompression, and clipboard copy

Connection Benchmarking

Built-in HTTP benchmarking with latency percentiles

Headless Mode

Background operation for scripting and automation, logs to stderr

Bulk Generate

kportal generate discovers cluster services and bulk-adds forwards with consecutive ports

Sensitive Header Redaction

HTTP log header values for Authorization, Cookie, tokens and similar are redacted automatically

Verified Installer

SHA-256 checksum verification on every install, with optional cosign signature check

Comparison

How kportal compares to other Kubernetes port-forwarding tools

K

kportal

Terminal TUI | Single binary

Persistent Config
Auto-reconnect
Hot-reload
Health Checks
Stale Detection
HTTP Logging
Benchmarking
mDNS Hostnames
Label Selectors
Headless Mode
System Tray
UDP Support
k9
k9s

Terminal TUI | Single binary

Persistent Config
Auto-reconnect
Hot-reload
Health Checks
Stale Detection
HTTP Logging
Benchmarking
mDNS Hostnames
Label Selectors
Headless Mode
System Tray
UDP Support
KF
Kube Forwarder

Desktop GUI | Electron

Persistent Config
Auto-reconnect
Hot-reload
Health Checks
Stale Detection
HTTP Logging
Benchmarking
mDNS Hostnames
Label Selectors
Headless Mode
System Tray
UDP Support
kft
kftray

Desktop + TUI | Tauri

Persistent Config
Auto-reconnect
Hot-reload
Health Checks
Stale Detection
HTTP Logging
Benchmarking
mDNS Hostnames
Label Selectors
Headless Mode
System Tray
UDP Support

Installation

Get started in seconds

Homebrew

macOS

brew install --cask lukaszraczylo/taps/kportal

Quick Install

All platforms

curl -fsSL https://raw.githubusercontent.com/lukaszraczylo/kportal/main/install.sh | bash

Verifies SHA-256 against the release checksums file. If cosign is on PATH, the keyless cosign signature is verified too. Set DRY_RUN=1 to preview, SKIP_COSIGN=1 to bypass cosign.

Manual Download

Linux, macOS, Windows (amd64 & arm64)

Download from GitHub Releases

Usage

Simple commands, powerful results

Interactive Mode

kportal

Launch the interactive TUI with real-time status updates and keyboard controls.

Verbose Mode

kportal -v

Run with detailed logging for debugging and automation.

Validate Config

kportal --check

Validate configuration without starting any forwards.

Custom Config

kportal -c /path/to/config.yaml

Use a custom configuration file instead of .kportal.yaml

Headless Mode

kportal -headless -v 2>kportal.log &

Run without TUI for scripting; logs are emitted on stderr.

Bulk Generate

kportal generate --context=my-cluster

Discover services in a cluster and bulk-add forwards with consecutive local ports. Add --dry-run to preview.

Keyboard Shortcuts

↑↓ Navigate
Space Toggle
n Add
e Edit
d Delete
j/k Vim nav
b Benchmark
l HTTP logs

Status Indicators

Active
Starting
Reconnecting
Error
Disabled

Configuration

Simple YAML configuration with powerful options

Basic Configuration
contexts:
  - name: production
    namespaces:
      - name: backend
        forwards:
          - resource: service/postgres
            protocol: tcp
            port: 5432
            localPort: 5432
            alias: prod-db

          - resource: pod/nginx
            protocol: tcp
            port: 80
            localPort: 8080
            httpLog: true   # log HTTP traffic
With mDNS & Health Checks
mdns:
  enabled: true

healthCheck:
  interval: "3s"
  method: "data-transfer"
  maxConnectionAge: "25m"

contexts:
  - name: production
    namespaces:
      - name: default
        forwards:
          - resource: service/postgres
            port: 5432
            localPort: 5432
            alias: db  # db.local

Resource Types

  • service/name Service
  • pod/name Pod by name
  • pod/prefix Pod by prefix
  • deployment/name Deployment

Label Selectors

  • resource: pod
  • selector: app=nginx
  • Dynamically resolves to running pods

Forward Options

  • resource - Target resource
  • port - Remote port
  • localPort - Local port
  • alias - Display name & mDNS
  • selector - Label selector

Advanced Features

Production-ready capabilities

Health Checks

Advanced health monitoring prevents stale connections during long operations.

tcp-dialFast connection test
data-transferVerifies tunnel
maxConnectionAgeAuto reconnect
maxIdleTimeDetect idle

mDNS Hostnames

Access forwards via .local hostnames without editing /etc/hosts.

alias: prod-db prod-db.local
service/redis redis.local

Works on macOS & Linux

Hot Reload

Configuration changes are applied automatically without restarting.

  • • File watcher detects changes in ~100ms
  • • New forwards start automatically
  • • Removed forwards stop gracefully
  • • Existing forwards continue

Retry Strategy

Exponential backoff with infinite retries ensures reliability.

1s 2s 4s 10s max

HTTP Traffic Logging

Press l to view real-time HTTP traffic.

List view: Time, Method, Status, Path
Enter Details f Filter / Search
Detail view: Headers, body, timing
c Copy body Esc Back
JSON highlighting, gzip decompression, binary detection
Sensitive header values (auth, cookies, tokens) redacted automatically
Press h in the add/edit wizard to toggle httpLog

Benchmarking

Press b to benchmark connections.

ConcurrencyParallel workers
RequestsTotal count
LatencyP50/P95/P99
ThroughputReq/s