- Create flask helloWorld app
- Containerized in docker
- Upload image -> AzureContainerRegistry
- Create Azure Kubernetes Service
- Deploy 2 k8s pods of our webapp with a LoadBalancer
# create pyenv
pip install -r requirements.txt
python app.py
# access by http://localhost:80
sudo docker build -t my-aks-app .
sudo docker run -p 4000:80 my-aks-app
# access by http://localhost:4000
az login
az acr show --name testmartinho --query loginServer --output table
sudo docker login testmartinho.azurecr.io
sudo docker tag my-aks-app:latest testmartinho.azurecr.io/test-aks:latest
sudo docker push testmartinho.azurecr.io/test-aks:latest
az acr repository list --name testmartinho --output table
- deployment.yaml
- azurePull
kubectl create secret docker-registry acr-secret \
--docker-server=testmartinho.azurecr.io \
--docker-username=testmartinho \
--docker-password= \
[email protected]
kubectl apply -f deployment.yaml
kubectl get pods
- service.yaml
kubectl apply -f service.yaml
kubectl get svc my-aks-app-service
kubectl get deployment my-aks-app-deployment
kubectl describe pod [pod-name]