Skip to main content

signadot local

Note

The examples here work with v0.5.0+ of the Signadot CLI.

The local command lets you run workloads locally that can interact with your cluster services.

Connecting to a Cluster

Connect your local environment to a cluster:

signadot local connect --cluster=my-cluster

This will:

  • Update /etc/hosts with cluster service names
  • Configure networking for local-cluster traffic

Once connected, you can run workloads locally that:

View connection status:

signadot local status

Disconnect from the cluster:

# Keep local sandbox configurations
signadot local disconnect

# Remove all local sandbox configurations
signadot local disconnect --clean-local-sandboxes

Using the Local Proxy

The local proxy command lets you run cluster services locally via proxy, similar to Kubernetes port forwarding.

Required parameters (choose one):

  • --sandbox <sandbox-name>
  • --routegroup <route-group-name>
  • --cluster <cluster-name>

In the event a Sandbox or RouteGroup is specified, the proxy goes to the associated cluster and will inject the associated routing keys (unless already present in a given request). In the event a cluster is specified, no headers are injected.

With this in hand, signadot local proxy then will proxy remote services to local servers, each specified as

--map <scheme>://<host>:<port>@<host>:<port>

Where:

  • Left of @: URL resolved in remote cluster
  • Right of @: Local bind address
  • Scheme: http, grpc, or tcp (no header injection with tcp)

Example - running a test against a sandbox:

export BACKEND_SERVICE_ADDR=localhost:8001
signadot local proxy --sandbox feature-x \
--map http://backend.staging.svc:8000@$BACKEND_SERVICE_ADDR &
pid=$!

# Run your test
newman run -env-var backend=$BACKEND_SERVICE_ADDR

kill $pid