Working with tcloud & Kubernetes

Working with Thalassa Cloud Kubernetes (tcloud)

This guide will help you manage and interact with your Kubernetes clusters using the Thalassa Cloud CLI (tcloud). The CLI provides a comprehensive set of commands for managing clusters, node pools, and accessing your Kubernetes environments.

Prerequisites

  • Thalassa Cloud CLI (tcloud) installed
  • Access to a Thalassa Cloud account
  • Proper authentication configured

Basic Commands

Listing Clusters

To view all your Kubernetes clusters:

tcloud kubernetes list
# or using the shorter alias
tcloud k8s ls

This will display a table with your clusters’ details including:

  • Cluster ID
  • Name
  • VPC
  • Kubernetes Version
  • Type
  • Status
  • Age

Connecting to a Cluster

There are two ways to connect to your Kubernetes cluster:

  1. Direct connection using cluster ID:
tcloud kubernetes connect <cluster-id>
  1. Interactive selection using fzf:
tcloud kubernetes connect

The connection command will:

  • Fetch the kubeconfig for your cluster
  • Configure your shell with the appropriate context
  • Establish a session to interact with the cluster

After this, you are able to use kubectl to interact with your Kubernetes cluster - no further configuration required.

Managing Kubeconfig

The CLI provides commands to retrieve a kubeconfig file. This is an alternative to using tcloud kubernetes connect to configure your shell for interacting with a Kubernetes cluster.

tcloud kubernetes kubeconfig <cluster-id>

This command helps you:

  • retrieve a kubeconfig file for the cluster

Store the output in a file and use it to configure your KUBECONFIG env variable, or kubectl context.

Version Management

To manage Kubernetes versions:

tcloud kubernetes versions

This allows you to:

  • List available Kubernetes versions
  • Check version compatibility
  • Plan version upgrades

Best Practices

  1. Use fzf for Better Productivity

    • Install fzf for fuzzy finding: brew install fzf
    • This enables interactive selection of clusters and resources
  2. Context Management

    • Use the --context flag to switch between different configurations
    • Example: tcloud kubernetes --context production
  3. Organization Management

    • Use the --organisation flag to specify the organization
    • Example: tcloud kubernetes --organisation my-org
  4. Authentication

    • Use OIDC authentication with --client-id and --client-secret
    • Or use personal access tokens with --token

Common Use Cases

Connecting to Production Cluster

# List clusters
tcloud kubernetes list

# Connect to production cluster
tcloud kubernetes connect k8s-identity-b

Troubleshooting

If you encounter issues:

  1. Verify your authentication:

    tcloud kubernetes list
  2. Check cluster status:

    tcloud kubernetes list