Quick start

This guide is intended to give you a quick overview of the main functionality of Krucible using the command line interface. Please see the Clusters documentation for more information about the web interface.

#Install the CLI

#Configure the CLI

1. If you haven't done so already, sign up for Krucible—it only takes a moment.

2. Create an API key from the API keys page

3. Run the command provided after creating the API key:

Create API key result

Fig 1.  Create API key result

#Create a cluster

Run the following command to create a Kubernetes cluster that will expire in an hour. This will cost one credit.

$ krucible create cluster --cluster-duration 1 --display-name my-cluster

Once the cluster is ready, the command will complete and the ID of the cluster will be printed.

#Connect to your cluster

Once your cluster is created you can interact with it using the kubectl command:

$ krucible kubectl --cluster $CLUSTER_ID get pods

Replace $CLUSTER_ID with the value returned from the create command.

If you have already have kubectl installed, you can also configure its context using the configure-kubectl command:

$ krucible configure-kubectl $CLUSTER_ID

After running this command you will be able to interact with your cluster using kubectl as usual.

#List clusters

Run the following command to list all clusters created within your account:

$ krucible get clusters

By default, results will be output in JSON format.

#Take and restore a snapshot

A complete snapshot of your cluster, including all running applications, can be captured with the following command:

$ krucible create snapshot $CLUSTER_ID

Note: This command may take up to ten minutes to complete and will shutdown your cluster.

Once the snapshot has been created, it can be restored by creating a new cluster:

$ krucible create cluster -d 1 -n my-restored-cluster -s $SNAPSHOT_ID

Replace $SNAPSHOT_ID with the output of the create snapshot command.