Example of running wordpress-mysql on okteto-cloud using pure terraform
Prerequisites
Steps:
- Clone repo:
git clone git@github.com:jhole89/terraform-k8s-example.git
- Change to this directory:
cd okteto-wordpress-mysql
- Initialise terraform:
terraform init
- Copy tfvars template:
cp terraform.tfvars.template terraform.tfvars
- Fill in
terraform.tfvars
with Okteto values (found in yourokteto-kube.config
- make sure yourokteto-kube.config
is also in your~/.kube/config
) - Apply terraform plan:
terraform apply --auto-approve
- you should see the following outputApply complete! Resources: 7 added, 0 changed, 0 destroyed. Outputs: frontend_url = https://wordpress-jhole89.cloud.okteto.net/
- The plan outputs the
url
exposed through the kubernetes service. You can now hit the endpoint using any web browser and set up your wordpress instance. - Once no longer required you can remove all resources:
terraform destroy --auto-approve