Skip to content

kx port-forward

Forwards a local port to an indexed resource. Given a workload rather than a Pod, kubectl picks which of its pods to forward to — the same choice kx exec leaves to kubectl.

Unrecognized flags are passed through to kubectl.

Usage

kx port-forward [OPTIONS] <index> <port> [kubectl flags]

Arguments

ArgumentDescription
<index>Row number from the current listing; run kx state to see it
<port>Port mapping, local:remote — e.g. 8080:80, or :80 to pick a local port

Global options

OptionDescription
--no-colorDisable styled output
-h, --helpShow this message and exit

Examples

kx port-forward 1 8080:80