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.
KL is another lazy command-line tool, this time designed to simplify logs reading
of Kubernetes pods. It allows you to quickly read and filter logs of your pods
without having to rely on long kubectl commands!
- Forward specific pods with local and remote ports
- Forward Kubernetes services by alias
- Read logs of Kubernetes pods
- List available forwarding profiles
- Easy configuration via
kf.yaml - Minimal dependencies
To install both kf and kl, clone the repository and install:
sudo make install-allOtherwise, to install kf only
sudo make installfVice versa, to install kl:
sudo make installl(Optional) Copy the default configuration:
make configkf <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!kl <service|alias> -n namespace [-f regexpFitler]Forward a service using a profile:
kf dev-profileForward a service by alias:
kf -s my-service:8080:80 -n devForward a specific pod:
kf -f mypod-123:3000:3000 -n stagingList available profiles:
kf -lRead logs of the xyz pod, containing the word foo
kl xyz -n staging -f ".*foo.*"kf uses a YAML configuration file (kf.yaml) to store profiles and service aliases.
You can customize this file to suit your Kubernetes environment.
- Go (for building from source)
- Kubernetes cluster access (
kubectlconfigured) - Make
Clone the repository:
git clone https://github.com/specialfish9/kf.git
cd kfBuild:
make installRun without installing:
go run ./cmd/kfThis README was AI generated and supervised by a human.