Skip to main content

Usage

First, start by authenticating kdctl so it knows what account it's working with.

Authenticate kdctl​

Take the API key you obtained from the Web UI and authenticate kdctl:

kdctl auth <API KEY>

Now that you have authenticated kdctl, you are all set to go.

Overview / Help​

At any time, to find out what actions are available in kdctl, you can execute the following command:

kdctl help

The help output looks like this:

    ._______  __.__                   .___
__| _/ |/ _| | ____ __ __ __| _/
/ __ || < | | / _ \| | \/ __ |
/ /_/ || | \| |_( <_> ) | / /_/ |
\____ ||____|__ \____/\____/|____/\____ |
\/ \/ \/

ϟ kdctl - KloudDeploy CLI utility and CI/CD helper v0.00.01

USAGE πŸ“‘οΈ

kdctl [FLAGS] <ACTION> [ARGUMENTS]
EXAMPLE:
kdctl LaunchPacks // Get LauncPack ID
kdctl providers 1 'Hello World' // Get Provider ID and Plan
kdctl deploy 123456789012345678 841859009819443200 1 // Deploy!!!



FLAGS 🏁️

-id string
Search for deployment or LaunchPack by its ID.

Compatible actions:

- deployments | example: kdctl -id 123456789012345678 deployments
- launchpacks | example: kdctl -id 123456789012345678 launchpacks


-json
Output results in JSON format so you can automate tasks with kdctl.

Compatible actions:

- balance | example: kdctl -json balance
- deployments | example: kdctl -json deployments
- launchpacks | example: kdctl -json launchpacks
- close | example: kdctl -json close 1234567890
- providers | example: kdctl -json providers 1234567890
- deploy | example: kdctl -json deploy 1234567890 1234567890 12


-name string
Search for deployment or LaunchPack by its NAME.

Compatible actions:

- deployments | example: kdctl -name 'Hello World' deployments
- launchpacks | example: kdctl -name 'Hello World' launchpacks

ACTIONS 🦾️

- auth <Auth Token>
~ Set auth token retrieved from KloudDeploy.

- balance
~ Get balance of your account. Takes no arguments

- deployments
~ Get a list of active deployments. Takes no argements.

- launchpacks
~ Get a list of LaunchPacks available to your account. Takes no arguments.

- providers <LaunchPack ID> <Deployment Name>
~ Get a list of providers available for a LaunchPack.

- deploy <Deployment ID> <Provider ID> <Duration: 1, 3, 6, or 12 months>
~ Deploys a LaunchPack on a specified provider for a specific duration.

- close <Deployment ID>
~ Closes a deployment based on Deployment ID.

- events <Deployment ID>
~ Get Kubernetes events from deployment.

- logs <Deployment ID>
~ Get container logs from deployment.

- help
~ Get help for this cli utility. Takes no arguments.

Account Balance​

To check your accounts balance, execute the following command:

kdctl balance

Active Deployments​

To check the active deployments of your account, execute the following command:

kdctl deployments

Create a Deployment​

To create a new deployment, ensure you have created a LaunchPack in the WebUI. Then execute the following command to identify the LaunchPack ID of the LaunchPack you want to use:

kdctl launchpacks

or search for the specific LaunchPack by name:

kdctl -name <NAME OF LAUNCHPACK> launchpacks

Once you identify the LaunchPack ID, execute the following command to create a deployment and get a list of available providers and their associated pricing:

kdctl providers <LAUNCHPACK ID> <NAME OF DEPLOYMENT WITH QUOTES OR SINGLE QUOTES>

Note: This command takes a little while as it's doing a lot of work in the background to derive the output.

From the output you will be able to find the Deployment ID and Provider ID. Use these IDs to execute the following command and choose a plan (1 month, 3 months, 6 months, 12 months):

kdctl deploy <DEPLOYMENT ID> <PROVIDER ID> <PLAN: 1, 3, 6, or 12> 

Note: This may take a little while as it deploys.

Once it's completed, the output will show you the IP and URL of the deployment.

Events and Logs​

To see the Kubernetes Events of your deployment, execute the following command:

kdctl events <DEPLOYMENT ID>

To see the container logs of your deployment, execute the following command:

kdctl logs <DEPLOYMENT ID>

Close a Deployment​

To close an active deployment, execute the following command:

kdctl close <DEPLOYMENT ID>