Port Forwarding

Forward ports from any Kubernetes resource with one click — no terminal commands, no manual cleanup.

Overview

Port forwarding lets you access a service running inside your cluster on your local machine. This is essential for debugging, testing APIs, connecting to databases, and accessing admin dashboards that aren't publicly exposed.

With kubectl port-forward, you have to remember the exact command syntax, keep a terminal open, and restart the forward every time it drops. Krust replaces all of that with a visual interface that manages connections automatically.

Official Kubernetes reference: kubectl port-forward.

Best fit: use Free for normal forwarding and saved profiles you start manually. Use Pro when you need multiple DNS mappings and want last session's forwards back in one step.

Quick Start

  1. Navigate to any resource that exposes ports — Pods, Deployments, StatefulSets, DaemonSets, or Services.
  2. Right-click the resource and open the Port Forward submenu, or select a Pod and press Shift+F.
  3. Krust reads the resource spec and lists the declared ports. Pick one, or choose Custom Port… (Pods, Deployments, StatefulSets, and DaemonSets) when the declared ports are missing or wrong.
  4. In the sheet, choose the Route — DNS hostname when Local Routing is set up, or localhost with a local port (or accept the suggested one) — and optionally turn on Open in browser when ready.
  5. Click Start. The connection opens immediately and, if enabled, your browser launches to the forwarded address.

Active port forwards appear in the macOS menu bar, in the toolbar's Port Forwards button, and in the Port Forwards sidebar view, where you can stop or restart them from one place.

Features

Smart Port Detection

Krust reads container port definitions directly from the resource spec. When you initiate a port forward, the available ports are pre-populated — no need to look up port numbers manually. Named ports are displayed alongside their numbers for clarity, and Services whose target port is a name (for example http) connect to the matching container port.

Auto-Open Browser

For HTTP services, Krust can automatically open your default browser pointed at the forwarded address as soon as the connection is ready. This is especially useful for web UIs, dashboards, and API documentation endpoints.

Auto-Reconnect

Network interruptions, pod restarts, and cluster hiccups happen. When a port forward drops, Krust detects the disconnection and re-establishes the tunnel automatically. No manual intervention required — the connection simply recovers.

When forwarding from a Service or workload (Deployment, StatefulSet, DaemonSet), Krust automatically re-resolves to a new backing pod if the original pod is evicted or restarted. It uses the service selector or workload labels to find a healthy replacement, retrying with backoff for up to 30 seconds. Direct pod forwards reconnect to the same pod on transient network failures.

Reopen Last Session Pro

Saving port-forward profiles and starting them one by one is part of Krust Free. On Pro, Krust offers the forwards you had running when it opens again: click Reopen and they all start, or use Start All Saved in the Port Forwards view. Krust never opens a tunnel on its own at launch, so nothing connects to a cluster until you ask.

A forward that fails to start stays in the list as Failed with the reason. Right-click it and choose Retry.

Multiple Concurrent Forwards

Run as many port forwards as you need simultaneously. Forward your database on one port, your API on another, and a monitoring dashboard on a third — all managed from a single interface.

Port-Forward Profiles Free

Save frequently used port forwards as reusable profiles for quick access. Profiles store resource identity and port mapping, so recurring dev tunnels can be restarted in one click. Reopening a whole session in one step is the Pro feature above.

Connection Status Tracking

Every forward in the Port Forwards view shows a real-time status dot:

The view also shows open connections and bytes sent and received for each forward. If a forward fails, Krust shows a Port Forward Error alert with details on what went wrong.

Menu Bar Controls

Active port forwards are accessible from the macOS menu bar. You can see all running forwards at a glance and stop or restart any of them without switching away from your current view.

Individual Stop & Start

Each port forward can be stopped and started independently. Pause a forward you don't need right now without tearing down everything else. Resume it later with the same configuration.

Why VPN Is Needed

Cluster internal addresses like *.svc.cluster.local are not normal public domains, so your Mac cannot open them directly by default.

Krust uses Apple Network Extension plumbing so those internal cluster addresses can work naturally in your browser and local tools. This is local Kubernetes networking support, not a traditional internet VPN.

DNS Proxy Workflow

When Local Routing is enabled, Krust lets you use *.svc.cluster.local hostnames locally, so links are easier to read and share.

Under the hood, Krust uses a Transparent Proxy network extension (listed in System Settings as Krust Packet Tunnel) with scoped DNS settings for svc.cluster.local, cluster.local and short .svc names, then relays those lookups to a local DNS listener backed by the app's active mapping snapshot. Public DNS stays on the normal macOS resolver path and is not forwarded by Krust.

Plan limits: Free includes 1 active DNS mapping at a time. Pro unlocks multiple concurrent DNS mappings. On Free, a second DNS forward runs on localhost instead. A forward also falls back to localhost when another cluster already uses the same hostname and port.

In Settings › Local Routing, you can verify whether Local Routing is active, whether the DNS Listener and Transparent Proxy components are healthy, and which cluster-local mappings Krust is serving.

Service context menu showing Port Forward and service port mapping 80 to 9090

For common web ports like 80 or 443, Krust may use a safe local fallback port automatically when needed.

Mappings are tracked by service hostname and service port, so one forwarded hostname can safely serve multiple ports without one route overwriting another.

Prometheus opened via cluster-local hostname with local fallback port 18080

You can verify active hostname-to-loopback mappings in the Local Routing sidebar view, including the resolved hostname, VIP, service port, and local URL currently in use.

DNS Proxy mappings table showing cluster-local hostname, loopback IP, local port, and resource

Krust vs. kubectl port-forward

CapabilityKrustkubectl port-forward
Start a forwardRight-click, select port, doneType full command with namespace, resource, and ports
Port discoveryPorts auto-detected from specLook up ports manually
Reconnect on dropAutomaticCommand exits, restart manually
Survive app restartPro profiles restore automaticallyGone when terminal closes
Saved profilesSave and restart with one click (Free); reopen the whole last session in one step (Pro)Shell aliases or scripts
Multiple forwardsManaged in a single panelOne terminal window per forward
Status visibilityLive status indicators and menu barTerminal output only
Browser integrationAuto-open on connectOpen browser manually

Tips