Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
67 changes: 67 additions & 0 deletions examples/terraform/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
# How to Deploy Talos Cluster in Public Cloud Platforms

In this guide, we will learn how to deploy Talos resources by using Terraform with cloud platforms.

You can look at [terraform module docs](https://registry.terraform.io/providers/siderolabs/talos/latest/docs) which provide explanations on guides, resources and data sources as the latest version.

### How to Deploy Talos Cluster in AWS

#### Prerequisites

- AWS Account
- AWS CLI
- Getting keys from AWS IAM and configuring it locally
- Terraform
- kubectl
- talosctl
- SSH key to connect to EC2 instances in talos (if necessary, use secrets manager to secure your secrets)

#### Setting up the environment

- Clone the [Sidero Labs' contribution repo](https://github.com/siderolabs/contrib) to your GitHub Account and then clone the repo on your computer.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
- Clone the [Sidero Labs' contribution repo](https://github.com/siderolabs/contrib) to your GitHub Account and then clone the repo on your computer.
- Fork the [Sidero Labs' contribution repo](https://github.com/siderolabs/contrib) to your GitHub Account and then clone the repo on your computer.

- Then, write ```cd contrib``` to go to the directory
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I wouldn't say "write" in each step. Instead I would put the commands needed in a code block so people can copy and paste them easily.

After you clone the repository locally you can move into the aws folder and initialize terraform

cd contrib/examples/terraform/aws
terraform init

Make any changes you need to add networks and configuration you need and then apply the resources and deploy the Cloud Controller Manager (CCM)

terraform apply
kubectl apply -f manifests/ccm.yaml

I think you could just do that once and say it applies to each cloud provider without having to repeat yourself.

- Open up your code editor
- Go to aws file by writing ```cd examples/terraform/aws```
- In your terminal, write ```terraform init``` to initialize the Terraform file
- Then write ```terraform apply``` to deploy the resources, you may need to customize the command
- After your resources were created in terraform, write ```kubectl apply -f manifests/ccm.yaml``` to deploy the manifest file

### How to Deploy Talos Cluster in Azure

#### Prerequisites

- Azure Account
- Azure CLI
- Terraform
- kubectl
- talosctl

#### Setting up the environment

- Clone the [Sidero Labs' contribution repo](https://github.com/siderolabs/contrib) to your GitHub Account and then clone the repo on your computer.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
- Clone the [Sidero Labs' contribution repo](https://github.com/siderolabs/contrib) to your GitHub Account and then clone the repo on your computer.
- Fork the [Sidero Labs' contribution repo](https://github.com/siderolabs/contrib) to your GitHub Account and then clone the repo on your computer.

- Then, write ```cd contrib``` to go to the directory
- Open up your code editor
- Go to aws file by writing ```cd examples/terraform/azure```
- In your terminal, write ```terraform init``` to initialize the Terraform file
- Then write ```terraform apply``` to deploy the resources, you may need to customize the command

### How to Deploy Talos Cluster in GCP

#### Prerequisites

- GCP Account
- gcloud CLI
- Terraform
- kubectl
- talosctl

#### Setting up the environment

- Clone the [Sidero Labs' contribution repo](https://github.com/siderolabs/contrib) to your GitHub Account and then clone the repo on your computer.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
- Clone the [Sidero Labs' contribution repo](https://github.com/siderolabs/contrib) to your GitHub Account and then clone the repo on your computer.
- Fork the [Sidero Labs' contribution repo](https://github.com/siderolabs/contrib) to your GitHub Account and then clone the repo on your computer.

- Then, write ```cd contrib``` to go to the directory
- Open up your code editor
- Go to aws file by writing ```cd examples/terraform/gcp```
- In your terminal, write ```terraform init``` to initialize the Terraform file
- Then write ```terraform apply``` to deploy the resources, you may need to customize the command

In addition to the steps in GCP, in Terraform, you need to define your project and your GCP account, and it is recommended to use secrets management tools