Skip to main content

sdctl CLI Reference

Installing the CLI

The latest version of the CLI is v0.10.0. This version of the CLI is compatible with Operator v0.18.0+. For information on releases, see changelog.

curl -o sdctl.tar.gz https://sdctl.s3.us-west-2.amazonaws.com/release/v0.10.0/signadot_0.10.0_darwin_amd64.tar.gz

Usage

Help

Use the help command to see a list of all available "root" commands and global flags:

sdctl help

Each command may have command-specific flags and nested sub-commands, which you can see by running:

sdctl help <command>

Start / Stop Daemon

The first step with the CLI is always to start the local daemon that manages connectivity to/from the cluster. This is done using the following command. Note that you need to only run this once.

$ sudo sdctl start # starts the daemon
Version: ...
GitCommit: ...
BuildDate: ...
writing logs to ...
starting server in the background with PID [1297710]
note

If you see writing logs to /root/... instead of to your non-root user's home directory, you may need to run this alternative command to ensure the daemon can find the correct kubectl credentials:

$ sudo sdctl stop # stop the daemon running in the wrong HOME dir
$ sudo --preserve-env=HOME sdctl start # restart it in your HOME dir

To terminate the daemon, you can run the following:

$ sudo sdctl stop # Stopping the daemon will terminate all connections.

Connect

To access all the services running in the Kubernetes cluster locally on your workstation, run the following:

$ sdctl connect

This will set up DNS resolution and TCP connectivity to all services in the cluster. To reach the services in the cluster, you can use the format <service-name>.<namespace>.svc from your local workstation or check /etc/hosts for all the different DNS formats.

$ sdctl connect
current context is: ...
attempting to connect, please wait...
... connection "connect-0fccf" created

Develop

You can use the develop command to route traffic for a deployment or argo-rollout (in the cluster) to a port on your workstation selectively.

$ sdctl develop deploy <deployment name> --ports [<local-port>] --sandbox=<sbx>
$ sdctl develop rollout <rollout name> --ports [<local-port>] --sandbox=<sbx>

The sandbox must first be created using sdctl create [sandbox|sb] command.

Connection Management

You can list all the current connections to/from the cluster using the get connection command as follows:

$ sdctl get connection
┌─────────────────────┬─────────────────────────────┬────────────────────────┐
│ CONNECTION ID │ DETAILS │ STATUS │
├─────────────────────┼─────────────────────────────┼────────────────────────┤
│ connect-80bfb │ Context: anirudh@signado... │ Healthy │
│ │ │ 30 services accessible │
├─────────────────────┼─────────────────────────────┼────────────────────────┤
│ develop-route-4fac9 │ Context: anirudh@signado... │ Healthy │
│ │ Sandbox: mywsps │ │
│ │ Deployment: hotrod/route │ │
│ │ Port: 8081 │ │
└─────────────────────┴─────────────────────────────┴────────────────────────┘

To delete a specific connection you can run:

$ sdctl delete conn <connection id>

Deleting a connect will reset the DNS resolution and terminate TCP connectivity to services running in Kubernetes. Deleting a develop will stop the service sending traffic to your workstation when it belongs to a particular sandbox.

Advanced Troubleshooting

Start sdctl in debug mode by running:

$ sudo sdctl -d start

You can view the debug logs from $HOME/.sdctl/logs/signadot.log