Skip to content

Latest commit

 

History

History
110 lines (87 loc) · 2.71 KB

README.md

File metadata and controls

110 lines (87 loc) · 2.71 KB

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.