Getting started with rackctl

This guide demonstrates how to create a Kubernetes cluster using the rackctl command-line tool.

Prerequisites

Creating a Kubernetes Cluster

Step 1: Set Authentication Token

First, set your session token as an environment variable:

export RACKCTL_SESSION_TOKEN=eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzdWIiOiJiMTgyNmRkZC04NTM4AwvIebpCuxvXQlB0h3hEM

Step 2: Create Kubernetes Cluster

Execute the cluster creation command:

rackctl create test-cluster

Expected Output

When successful, you’ll see the following type of output:

Creating cluster with name: test-cluster
✅ Kubeconfig saved to "/Users/userone/.k8/kubeconfig.yml"
📝 Saved resource_id to "/Users/userone/.rackmint/k8"

Please note that the path for kubeconfig is automatically evaluated if you have KUBECONFIG defined, if not it will default to the default KUBECONFIG value which is generally in the user home directory

Kubeconfig Details

The generated kubeconfig contains:

Next Steps

After successfully creating your cluster, you can:

  1. Use the generated kubeconfig to interact with your cluster:

    kubectl get nodes
  2. Set up SSL and Ingress and Deploy applications to your cluster following the Deployment Guide

Troubleshooting

If you encounter issues: