Skip to content
Back to skills

Kubectl Port Forward

ASecurity

Use kpf, a fast, idempotent drop-in replacement for kubectl port-forward that manages and reuses port-forward sessions. Use when a user needs repeatable Kubernetes port forwarding with quick startup.

  • 57 stars
  • 0 votes
  • 0 copies
  • 1 view
  • Added October 17, 2026
toolsshellkubernetesdebugginggit

Security analysis

A100/100

Scanned October 17, 2026

npx -y skills add diegosouzapw/awesome-omni-skill --skill kubectl-port-forward --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Kubectl Port Forward?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Kubectl Port Forward
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/diegosouzapw-kubectl-port-forward/badge)](https://www.skillsdirectory.com/skills/diegosouzapw-kubectl-port-forward)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: kubectl-port-forward
description: Use kpf, a fast, idempotent drop-in replacement for kubectl port-forward that manages and reuses port-forward sessions. Use when a user needs repeatable Kubernetes port forwarding with quick startup.
---

# kubectl-port-forward

Use this skill when you need to run Kubernetes port-forwarding commands.

`kpf` is a fast, idempotent, non-blocking, drop-in replacement for `kubectl port-forward`.
It manages background port-forward sessions and reuses them for identical requests,
which speeds up connection time and reduces complexity of port forwarding in scripts.

Example use cases:

- Port-forwarding to an internal service that is not yet exposed via a domain.
- Port-forwarding to a service that has a domain but requires SSO auth (for example, Vouch proxy), making automation harder.

Use `kpf` when running ad-hoc commands, but do NOT commit scripts that depend on `kpf`
as it's not a standard tool in the developer toolbox and may not be available in all environments.

## Run

Use `kpf` with the same argument style as `kubectl port-forward`.
Prefer using a random port (by omitting the local port), to avoid port conflicts.
Example usage:

```shell
PORT=$(kpf --context=<context> --namespace=<ns> service/<name> 8481)
curl "http://127.0.0.1:${PORT}/example"
```

If you _want_ the `kpf` session to be kept alive indefinitely, use `kubectl port-forward` instead,
since `kpf` sessions have a TTL.

## Troubleshooting

If you run into issues with the `kpf` tool itself, first try `kubectl port-forward`
with the same arguments to verify that the issue is with `kpf` and not your cluster or network.
Then consult https://github.com/bduffany/kpf/blob/main/README.md for more technical details
that may help with debugging.

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.