simple CLI tool designed to manage multiple k9s port forwards.
- Multi-Profile Management: switch between different profiles.
- Port Forwarding: manage port forwards across various environments using k8s files and contexts.
- CLI Friendly: run from terminal, simple commands
- Install KGate:
Ensure you have golang installed on your system and run:go install cmd/kgate/kgate.go
- Create a Profile:
Create a new profile by running:kgate p c my-profile
- Configure the Profile:
Open and complete profile settings:vim ~/.config/kgate/settings.yaml
- Run KGate:
Start KGate with:kgate
To view the help menu and available commands, use:
kgate --help
Switch to another profile using (fuzzy search):
kgate p other-profile
Run specific groups by specifying them with the -g
flag:
kgate -g env1 -g env2
KGate uses a YAML configuration file located at ~/.config/kgate/settings.yaml
. An example configuration is provided below:
current: demo
profiles:
demo:
name: demo
data:
groups:
- name: env1
target:
k8sConfigFile: ${HOME}/.kube/config
k8sContext: pvt-dev1
portForwards:
- namespace: lab-postgresql
service: lab-postgresql
localPort: "11001"
remotePort: "5432"
- name: env2
target:
k8sConfigFile: ${HOME}/.kube/config
k8sContext: pvt-dev2
portForwards:
- namespace: lab-postgresql
service: lab-postgresql
localPort: "12001"
remotePort: "5432"
Note: Customize the configuration to suit your Kubernetes contexts and port forwarding requirements.
For the latest test coverage details, please visit the Test Coverage Report.