Skip to main content

Diagrid CLI

The Diagrid CLI allows you to run commands against the Conductor APIs and can be used to perform all the actions available in the Conductor console. This includes:

  • Create and manage cluster connections
  • Install and upgrade Dapr
  • Manage users
  • Run diagnostics

Installing the CLI

Download and install the Diagrid CLI using the following command:

curl -o- https://downloads.diagrid.io/cli/install.sh | bash

Move the diagrid binary into your path so you can run it from anywhere. For example:

sudo mv ./diagrid /usr/local/bin 

Using the CLI

The CLI is a static binary that should be executed from the command line. Help pages are available to allow you to discover how to navigate the command tree and to see what flags are available on each command.

In order for the CLI to authenticate to the Diagrid Cloud API it is important that you first login using:

diagrid login

The Diagrid CLI is compatible with both products: Catalyst and Conductor. If you have access to both products, you can choose which set of commands to use by specifying the product name with the command: you can choose which one to use by specifying the product with the command:

diagrid product use conductor

Logging in will store the credentials in the ~/.diagrid directory on your filesystem. If you want to clean up your user data you can logout with the command:

diagrid logout

To verify the identity and current organization of your user you can use this command:

diagrid whoami

Once logged in, you may exercise the other commands the CLI supports, such as:

diagrid clusters list

Gathering diagnostics

To capture detailed Diagrid Agent diagnostic information, logs, Kubernetes configurations, perform the following steps:

  • Set kubectl context for the correct Kubernetes cluster
  • Run the following command: diagrid diagnose
  • Send the above file to support@diagrid.io

Connecting a cluster

To connect your Kubernetes cluster to Diagrid Conductor you can perform the following steps:

  • Set kubectl context for the correct Kubernetes cluster
  • Use the command diagrid clusters connect

Example:

diagrid clusters connect --name mycluster --install-dapr --profile dev --manifests | kubectl apply -f -