- kubectl (https://kubernetes.io/docs/tasks/tools/install-kubectl/)
- azure cli (https://docs.microsoft.com/en-us/cli/azure/install-azure-cli?view=azure-cli-latest)
- ansible (https://docs.ansible.com/ansible/latest/installation_guide/intro_installation.html)
- terraform (https://learn.hashicorp.com/tutorials/terraform/install-cli)
- make (brew install make) [install brew in case not installed: https://brew.sh]
- You can use a service principal with Owner/Contributor role or you can login as yourself if you have the access to create aks and network
NOTE (Shold Not Be Missed): Please do ensure the user update the variables.yaml file under values dir to fit your requirements before running any commands related to infra automation
Once installed run the below command to setup the aks and the kong and a demo app
git clone https://github.com/Sam123ben/devops.git
cd devops
make login
make provision-aks
The above commands will create the following below:
- RESOURCE GROUP
- VNET
- SUBNET
- AKS
- KONG GATEWAY (CE)
- A DEMO APP
Once all the above are created and are deployed we can access the sample app using the host:
ingressIp=$(kubectl get ingress -n dev --namespace dev -o jsonpath='{.items[*].status.loadBalancer.ingress[*].ip}')
curl -i -H "Host: *" $ingressIp
On the browser you can access the same via http://$ingressIp
- ansible (Used for templating the terraform to be able to create the infra)
- terraform (Used for automating the infrastructure)
- scripts (simple bash script to trigger the terraform and kubectl commands)
- value (A value file where all the proeprties and related values are maintained which will be used by the end users to create the infra)
cd devops
make login
make delete-all