All Tools View Categories About Contact Privacy

kubectl port-forward Command Generator

Build a correct kubectl port-forward command for pods, deployments and services.

Runs entirely in your browser - nothing is uploaded and no cluster connection is made.
Your generated command will appear here.

About kubectl port-forward Command Generator

Port forwarding lets you reach a cluster service from your laptop. The kubectl port-forward Command Generator builds a correct command so you do not have to recall the port syntax.

Choose the resource, add one or more local:remote port pairs, set the namespace and optional address, and copy the result.

Validation ensures at least one port pair and well-formed ports. Everything runs locally and nothing is uploaded.

Features

  • Any resource - pod, deploy, service, rs.
  • Port pairs - local:remote mappings.
  • Namespace - -n flag.
  • Address - --address bind option.
  • Copy / Download / Print - take the command anywhere.

How to Use

  1. Enter the resource (pod/my-pod or deploy/my-app).
  2. Add port pairs (8080:80).
  3. Watch the preview and export.

Examples

Example 1 - single. kubectl port-forward pod/my-pod 8080:80.

Example 2 - service + address. kubectl port-forward svc/api 9000:443 -n prod --address 0.0.0.0.

Benefits

  • Correct syntax - valid kubectl port-forward.
  • Multiple ports - several mappings.
  • Validated - ports checked.
  • Private - runs in the browser.
  • Copy, download or print - get the command where you need it.

Frequently Asked Questions

What does this tool build?
It assembles a kubectl port-forward command for a pod, deployment or service plus the local and remote port mapping.
What resources are supported?
Pods, Deployments, ReplicaSets, Services and any resource that exposes a port. The type/name form (e.g. deploy/my-app) is accepted.
How are ports specified?
You provide local and remote port pairs. A single pair maps LOCAL:REMOTE; multiple pairs can be forwarded at once.
What does the address flag do?
The --address flag binds the local listener to an address such as 127.0.0.1 or 0.0.0.0.
Does this connect to a cluster?
No. Everything runs locally; the output is just a command string.
Can I copy or download the command?
Yes. Copy the command, download pf-cmd.sh, or print it.