.
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 Kubernetes Configs repository.
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 console to configure your standard-user Kubernetes.
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-admin kubectl config use-context tardis-admin
Following this, you'll need to clone the repository by running
git clone https://git.tardisproject.uk/tardis/k8s 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 kubectl
.