/terraform-azure-staticwebsite-on-k8s-minikube

terraform'ing the deployement of a static wesbite in azure with kubernetes

Primary LanguageHCL

Static app on k8s x Azure.

Terraform'ing the deployment of a static website in azure with kubernetes.

Medium articles behind this repo :

Requirements

Please make sure to do this on local or remote where you want to run the script :

  • Create an an azure account.
  • Install azure CLI.
  • Install Terraform.
  • Install Docker.

Repo Structure

  • Docker folder for the docker file of the static website.
  • Kubernetes folder : contains k8s deployment and service objects yml files and bash scripts that will be used later by terraform to install minikube and create a Kubernetes secret to connect to azure container registry.
  • terraform folder : containing our infrastructure's code on azure and it's configuration with terraform provisioner resources .

Usage

  1. build and push the docker image :
make build && make push
  1. create the terraform ressources :
cd terraform && make apply

TODO

  • Build and push static website in a github action.
  • Make the terraform build and push the image once the azurecr is created.
  • Add an AKS version.

License

MIT