hosts:k8s:working-with-terraform
Differences
This shows you the differences between two versions of the page.
| Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
| hosts:k8s:working-with-terraform [2025/02/18 00:33] – emily747 | hosts:k8s:working-with-terraform [2025/09/26 19:13] (current) – emily747 | ||
|---|---|---|---|
| Line 1: | Line 1: | ||
| - | ====== | + | .====== Terraform ====== |
| + | |||
| + | Terraform is how we manage our k8s. As an Infrastructure-as-Code solution, it allows us to create a reproducible deployment using just a few configuration files and commands (in theory). These configurations are managed in the [[https:// | ||
| + | |||
| + | ========= Step-by-step deployment ========= | ||
| + | |||
| + | The first step to deploying is to configure your working environment. You'll need to ssh into sandbox and follow the steps in [[https:// | ||
| + | |||
| + | Once this is done, you can run the following commands in sandbox. | ||
| + | |||
| + | kubectl config set-context tardis-admin --cluster=tardis --user=tardis-oidc --namespace=tardis | ||
| + | kubectl config use-context tardis-admin | ||
| + | |||
| + | Following this, you'll need to clone the repository by running | ||
| + | |||
| + | git clone https:// | ||
| + | cd k8s | ||
| + | |||
| + | You can now run the following commands to setup terraform. | ||
| + | |||
| + | terraform init | ||
| + | |||
| + | And run the following commands to deploy your changes each time | ||
| + | |||
| + | terraform plan # shows you the changes | ||
| + | terraform apply # applies the changes to production | ||
| + | |||
| + | While much of this is handled in terraform, for debugging purposes, you may need to use '' | ||
| - | sd | ||
hosts/k8s/working-with-terraform.1739838830.txt.gz · Last modified: 2025/02/18 00:33 by emily747
