kubectl plugins for managing gridX infrastructure.
- kubectl-datastore — manage named datastore configs per kube context
- kubectl-tunnel — create ephemeral socat-based port-forward tunnels through EKS
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 listCreates 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># 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-dbmake 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