Skip to content

Repository files navigation

tf-rancher-up

This repository maintains reusable terraform modules to deploy Rancher and Kubernetes clusters managed by Rancher.

The modules support major infrastructure/cloud platforms (AWS, VMware, Azure, GCP, DigitalOcean). Provisioning can be customized using different Kubernetes distributions (RKE, RKE2, K3S, EKS, AKS, GKE).

Architecture

The project uses two main concepts:

  • Modules: Focused, reusable building blocks that handle specific infrastructure components.
  • Recipes: Compositions of modules that provision full, end-to-end stacks.

We define clusters in two ways:

  • Upstream (Management Cluster): The cluster where Rancher is installed and runs.
  • Downstream (Workload Cluster): Clusters managed by Rancher where your applications run.

Quick Start: AWS RKE2 Upstream

Use these steps to set up a Rancher management cluster on AWS with RKE2.

  1. Clone the repository and navigate to the recipe directory:
    git clone https://github.com/rancher/tf-rancher-up.git
    cd tf-rancher-up/recipes/upstream/aws/rke2
  2. Create your configuration file:
    cp terraform.tfvars.example terraform.tfvars
  3. Edit terraform.tfvars with your AWS credentials, region, and desired settings.
  4. Initialize and apply the configuration:
    terraform init
    terraform plan
    terraform apply

Quick Start: DigitalOcean RKE2 Upstream

Use these steps to set up a Rancher management cluster on DigitalOcean with RKE2.

  1. Clone the repository and navigate to the recipe directory:
    git clone https://github.com/rancher/tf-rancher-up.git
    cd tf-rancher-up/recipes/upstream/digitalocean/rke2
  2. Create your configuration file:
    cp terraform.tfvars.example terraform.tfvars
  3. Edit terraform.tfvars with your DigitalOcean token, region, and desired settings.
  4. Initialize and apply the configuration:
    terraform init
    terraform plan
    terraform apply

Recipes

Provider Upstream Recipes Downstream/Standalone Recipes
Any / None None Custom, Imported
AWS RKE, RKE2, K3S v2, EKS, RKE, Split-roles RKE
Azure RKE, RKE2, K3S, AKS None
Google Cloud RKE, RKE2, K3S, GKE GKE
DigitalOcean RKE, RKE2, K3S None
VMware RKE, RKE2, K3S None

About

No description, website, or topics provided.

Resources

Code of conduct

Contributing

Security policy

Stars

23 stars

Watchers

19 watching

Forks

Releases

Packages

Used by

Contributors

Languages