kubefwd

DevOps编辑精选

by txn2

kubefwd 是让 AI 帮你批量转发 Kubernetes 服务到本地的开发神器。

微服务开发者最头疼的本地调试问题,它一键搞定——自动分配 IP 避免端口冲突,还能用自然语言查询状态。但依赖 AI 工作流,纯命令行爱好者可能觉得不够直接。

4.1kGitHub

什么是 kubefwd

kubefwd 是让 AI 帮你批量转发 Kubernetes 服务到本地的开发神器。

README

kubefwd (Kube Forward)

kubefwd - kubernetes bulk port forwarding

CNCF Landscape GitHub license codecov Go Report Card GitHub release GitHub Downloads OpenSSF Scorecard OpenSSF Best Practices SLSA 3

Documentation | Getting Started | User Guide | API Reference | MCP (AI Integration)

Develop Locally, Connect to Kubernetes

kubefwd enables developers to work on their local machine while seamlessly accessing services running in a Kubernetes cluster. If you're building a new API that needs to connect to a database at db:5432, an auth service at auth:443, and a cache at redis:6379, all running in your development cluster, kubefwd makes them available locally by their service names, exactly as they would appear in-cluster. No environment-specific configuration, no local service setup, no Docker Compose files. Just run kubefwd and your application's existing connection strings work.

This is the essential use case: reduce or eliminate environment-specific connection setup and configurations during local development. Your code uses http://api-gateway:8080 in production? It works the same way on your laptop with kubefwd.

Bulk Kubernetes port forwarding with an interactive TUI, unique IPs per service, and automatic reconnection.

kubefwd is a command-line utility that bulk port forwards Kubernetes services to your local workstation. Each service gets its own unique loopback IP (127.x.x.x), eliminating port conflicts and enabling realistic local development with cluster services accessible by name.

kubefwd TUI - Main View

Quick Start

bash
# Install (macOS)
brew install kubefwd

# Forward all services in a namespace with the interactive TUI
sudo -E kubefwd svc -n my-namespace --tui

Press ? for help, q to quit. See Getting Started for detailed installation and setup.

How It Works

<div align="center"> <img width="654" alt="kubefwd - Kubernetes Port Forward Diagram" src="https://mk.imti.co/images/content/kubefwd-net.png"> </div>

kubefwd discovers services in your namespace, assigns each a unique loopback IP, updates /etc/hosts with service names, and establishes port forwards through the Kubernetes API. Access services by name just like in-cluster:

bash
curl http://api-service:8080
mysql -h database -P 3306
redis-cli -h cache -p 6379

Features

  • Interactive TUI: Real-time service monitoring with traffic metrics
  • Unique IP per Service: Each service gets its own 127.x.x.x address
  • Auto-Reconnect: Reconnects when pods restart or connections drop
  • Bulk Forwarding: Forward all services in a namespace with one command
  • Live Traffic Monitoring: See bytes in/out and HTTP activity
  • Pod Log Streaming: View container logs in the TUI
  • REST API: Programmatic control via HTTP endpoints
  • MCP Support: Integration with AI assistants (Claude Code, Cursor)

Installation

macOS:

bash
brew install kubefwd

Linux: Download .deb, .rpm, or .tar.gz from releases

Windows:

powershell
winget install txn2.kubefwd
# or
scoop install kubefwd

Docker:

bash
docker run -it --rm --privileged \
  -v "$HOME/.kube:/root/.kube:ro" \
  txn2/kubefwd services -n my-namespace --tui

Usage

bash
# Interactive mode (recommended)
sudo -E kubefwd svc -n default --tui

# Multiple namespaces
sudo -E kubefwd svc -n default,staging --tui

# Filter by label
sudo -E kubefwd svc -n default -l app=api --tui

# With REST API enabled
sudo -E kubefwd svc -n default --tui --api

Why kubefwd?

Unlike kubectl port-forward, kubefwd:

Featurekubectl port-forwardkubefwd
Services per commandOneAll in namespace
IP allocationlocalhost onlyUnique IP per service
Port conflictsManual managementNone (unique IPs)
Service name resolutionNot supportedAutomatic (/etc/hosts)
Auto-reconnectNoYes
Real-time monitoringNoTUI with metrics

See Comparison for detailed comparisons with Telepresence, mirrord, and other tools.

Documentation

Full documentation at kubefwd.com:

Requirements

  • kubectl configured with cluster access
  • Root/sudo access (for /etc/hosts and network interfaces)

Contributing

We welcome contributions for bug fixes, tests, and documentation. Feature development is limited to maintainers. See CONTRIBUTING.md.

License

Apache License 2.0


Open source by Craig Johnston, sponsored by Deasil Works, Inc.

常见问题

kubefwd 是什么?

Manage Kubernetes service port forwarding for local development through AI-powered workflows. kubefwd bulk-forwards services from namespaces to your local machine, assigning each service a unique loopback IP so multiple services can use the same ports without conflicts. Query forwarded services, check connection status, view traffic metrics, diagnose errors, and manage port forwards through natural language. Ideal for developers working with microservices who need seamless cluster connectivity.

相关 Skills

可观测性设计

by alirezarezvani

Universal
热门

面向生产系统规划可落地的可观测性体系,串起指标、日志、链路追踪与 SLI/SLO、错误预算、告警和仪表盘设计,适合搭建监控平台与优化故障响应。

把监控、日志、链路追踪串起来,帮助团队从设计阶段构建可观测性,排障更快、系统演进更稳。

DevOps
未扫描9.0k

资深开发运维

by alirezarezvani

Universal
热门

覆盖 CI/CD 流水线生成、Terraform 基建脚手架和自动化部署,适合在 AWS、GCP、Azure 上搭建云原生发布流程,管理 Docker/Kubernetes 基础设施并持续优化交付。

把CI/CD、基础设施即代码、容器与监控串成一条交付链,尤其适合AWS/GCP/Azure多云团队高效落地。

DevOps
未扫描9.0k

环境密钥管理

by alirezarezvani

Universal
热门

统一梳理dev/staging/prod的.env和密钥流程,自动生成.env.example、校验必填变量、扫描Git历史泄漏,并联动Vault、AWS SSM、1Password、Doppler完成轮换。

统一管理环境变量、密钥与配置,减少泄露和部署混乱,安全治理与团队协作一起做好,DevOps 场景很省心。

DevOps
未扫描9.0k

相关 MCP Server

Cloudflare

编辑精选

by Cloudflare

热门

Cloudflare MCP Server 是让你用自然语言管理 Workers、KV 和 R2 等云资源的工具。

这个工具解决了开发者频繁切换控制台和文档的痛点,特别适合那些在 Cloudflare 上部署无服务器应用、需要快速调试或管理配置的团队。不过,由于它依赖多个子服务器,初次设置可能有点繁琐,建议先从 Workers Bindings 这类核心功能入手。

DevOps
3.6k

Terraform

编辑精选

by hashicorp

Terraform MCP Server 是让 AI 助手直接操作 Terraform Registry 和 HCP Terraform 的桥梁。

如果你经常在 Terraform 里翻文档找模块配置,这个服务器能省不少时间——直接问 Claude 就能生成准确的代码片段。最适合管理多云基础设施的团队,但注意它目前只适合本地使用,别在生产环境里暴露 HTTP 端点。

DevOps
1.3k

by monsterxx03

停更

检查运行中的 Go 进程,查看 goroutine 状态、内存统计与二进制信息,并通过终端 UI、HTTP API 或 SSE 端点访问数据。

排查 Go 服务运行态问题很顺手,能直接查看 goroutine、内存和二进制信息,还同时提供终端 UI、HTTP API 与 SSE,临时诊断和接入监控都方便。

DevOps4 个工具
96

评论