Migrating a PHP MySQL application to Azure Kubernetes Service (AKS) with Deployment, StatefulSet, Secret, Key-Vault, Ingress and AGIC
These are step by step actions to migrate a simple PHP-MySQL solution to Azure Kubernetes Service (AKS).
Prerequisites:
- Azure Account and access to provison a resource group, VNET, AKS cluster, ACR, Ingress Controller, Key-vault and optionally Application Gateway.
- Download/clone this code from GitHub.
- Visual Studio Code installed on development machine. Use bash terminal.
- Docker Desktop installed on client machine.
What we are going to create:
Follow steps given in instructions.txt file. We will use Azure Shell and VSCode to create
- An AKS cluster.
- An ACR.
- Deployment to run PHP containers, Statefulset to run MYSQL container.
- Secrets, Key-Vault to store sensitive information like database connection related informations.
- Headless ClusterIP service to reach MySQL StatefulSet.
- Load Balancer, Ingress and optionally App-Gateway to expose the application.
- Implement Prometheus and Grafana in the cluster.
