Deploy Kubernetes worker nodes to CLASTIX managed clusters using Terraform
node_count
variable if you need a different number of nodes.Download the example files
Initialize Terraform
bash terraform init
Update variables
variables.tf
file with your specific details:JOIN_URL
: The URL of Tenant Control Plane to join. Find this on the Clastix Cloud Console.
JOIN_TOKEN
: The token to join the Tenant Control Plane. Find this on the Clastix Cloud Console. You will be asked for it when planning and applying your plan.
JOIN_TOKEN_CACERT_HASH
: The CA certificate hash of the token. Find this on the Clastix Cloud Console. You will be asked for it when planning and applying your plan.
LATITUDESH_AUTH_TOKEN
: Don’t hardcode this. You will be asked for it when planning and applying your plan.
project_id
: The ID of the project you want to deploy to. Find this from the home page in the console.
plan
: The plan slug. For example, for the m4.metal.medium, use m4-metal-medium
region
: The slug of the location you want to deploy to. E.g., for Dallas use DAL
. Find all with the api.latitude.sh/locations endpoint.
ssh_key_id
: The ID of the SSH key you want to use for the nodes. Find this in the console under Project settings > SSH keys
private_key_path
: This script will access your servers during setup. Add the local path in your computer where the private key of the SSH Key inserted above.
server_count
: Optional. Number of nodes to provision and add to the cluster.
Review configuration
variables.tf
as needed:project_id
: Your Latitude project IDregion
: The region where you want to deploy the clusterplan
: The server plan for the nodesnode_count
: The number of worker nodes (default is 3)main.tf
file if necessary.Plan your Terraform execution
bash terraform plan
Apply the changes
yes
when prompted.