Skip to content

Latest commit

 

History

1 Commit

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

gx

kubectl plugins for managing gridX infrastructure.

Plugins

  • kubectl-datastore — manage named datastore configs per kube context
  • kubectl-tunnel — create ephemeral socat-based port-forward tunnels through EKS

Usage

kubectl-datastore

Datastore entries are stored in ~/.gx/datastores.json and scoped to the active kubeconfig context.

# Add a named datastore entry for the current context
kubectl datastore add <name> --url <url> --port <port>

# List all datastores for the current context
kubectl datastore list

kubectl-tunnel

Creates a temporary socat pod in the active EKS cluster, port-forwards through it to the named datastore, and tears the pod down on exit (Ctrl-C).

# Tunnel to a datastore (uses the port from the datastore config)
kubectl tunnel <datastore-name>

# Tunnel on a specific local port
kubectl tunnel <datastore-name> --port <local-port>

# Tunnel using a specific namespace for the socat pod
kubectl tunnel <datastore-name> --namespace <namespace>

Typical workflow

# Register a datastore once per context
kubectl datastore add my-db --url db.internal.example.com --port 5432

# Open a tunnel whenever you need local access
kubectl tunnel my-db

Build

make install   # build and install both plugins to $GOPATH/bin
make build     # build binaries into current directory
make test      # go test ./...
make vet       # go vet ./...
make tidy      # go mod tidy

About

Collection of opinionated plugins for kubectl

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages