terraform + kubernetes for laravel, nginx, mysql
- Setup kubernetes cluster
You can use minikube, k3s, k3d, or anything that you want.
k3d cluster create percobaandua --api-port 10.199.16.55:8443 -p 8000:30080@agent[0] -p 8043:30443@agent[0] --agents 1
- Intall terraform
Check this link to learn how to install terraform. - Clone this repository and go inside the clonned folder
git clone https://github.com/LERUfic/terraform-laravel
- Initialize the project
terraform init
- Check your deployment using terraform plan before you actually create your infrastructure
terraform plan
- If you are sure the plan result is correct, you can apply the deployment
terraform apply
#A promt will appear, all you need is just type yes and enter