Skip to content

simple cli tool to manage multiple k9s port forwards

License

Notifications You must be signed in to change notification settings

rollicks-c/kgate

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

KGate

simple CLI tool designed to manage multiple k9s port forwards.

Preview

Table of Contents

Features

  • 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

Installation & Getting Started

  1. Install KGate:
    Ensure you have golang installed on your system and run:
    go install cmd/kgate/kgate.go
  2. Create a Profile:
    Create a new profile by running:
    kgate p c my-profile
  3. Configure the Profile:
    Open and complete profile settings:
    vim ~/.config/kgate/settings.yaml
  4. Run KGate:
    Start KGate with:
    kgate

Usage

Display Help

To view the help menu and available commands, use:

kgate --help

Switching Profiles

Switch to another profile using (fuzzy search):

kgate p other-profile

Running only specific Groups

Run specific groups by specifying them with the -g flag:

kgate -g env1 -g env2

Configuration

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.

Build Status

Go CI

Test Coverage Report

For the latest test coverage details, please visit the Test Coverage Report.

Releases

No releases published

Packages

No packages published

Languages