Skip to content

specialfish9/kf

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

21 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

KF

KF is a lazy command-line tool designed to simplify port forwarding for Kubernetes pods. It allows you to quickly forward services, pods, and ports without manually typing long kubectl commands.

Features

  • Forward specific pods with local and remote ports
  • Forward Kubernetes services by alias
  • List available forwarding profiles
  • Easy configuration via kf.yaml
  • Minimal dependencies

Installation

Clone the repository and install:

sudo make install-bin

(Optional) Copy the default configuration:

make config

Usage

kf <profile> [-n namespace]
kf -s (--service) <alias service>[:lport][:rport]... [-n namespace]
kf -f (--forward) <pod_name>:<lport>:<rport>... [-n namespace]
kf -l (--list)
kf -h (--help) # use help to see other options!

Examples

Forward a service using a profile:

kf dev-profile

Forward a service by alias:

kf -s my-service:8080:80 -n dev

Forward a specific pod:

kf -f mypod-123:3000:3000 -n staging

List available profiles:

kf -l

Configuration

kf uses a YAML configuration file (kf.yaml) to store profiles and service aliases. You can customize this file to suit your Kubernetes environment.

Requirements

  • Go (for building from source)
  • Kubernetes cluster access (kubectl configured)
  • Make

Development

Clone the repository:

git clone https://github.com/specialfish9/kf.git
cd kf

Build:

make install

Run without installing:

go run ./cmd/kf

This README was AI generated and supervised by a human.

About

Kubernetes pod forwarder

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors