Skip to content

Latest commit

 

History

History
46 lines (27 loc) · 1.62 KB

File metadata and controls

46 lines (27 loc) · 1.62 KB

how to deploy web app using azure kubernetes services:

  1. First create kubernetes cluster using azure kubernetes services and select a amchine(eg. bs2) and deploy
  2. open azure cloud shell and clone ur git repository by running the following command

git clone "link"

  1. connect your kubernetes cluster to ur azure cloud shell by clicking on connect button appear in your cluster resource and copy the commands and run those commmand in cloud shell

4)now search for container registry in search button of azure portal and click on create in container registries services

  1. after creating container registry copy the "login server url", username and password

  2. In cloud shell, docker login username: password:

  3. Change directory into project directory containing Dockerfile

  4. Now build a docker image docker build -t /image_name .

  5. Integrate Azure Container Registry with Azure Kubernetes cluster az aks update -n -g --attach-acr

  6. change directory into directory containing kubernetes deployment file cd infra/k8s

  7. apply deployment configuration which will create deployment and service on our kubernetes cluster kubectl apply -f file_name.yaml

  8. To see whether the deployment is successfull or not run kubectl get pods

    now if status of pod is running then deployment is successfull

  9. Now find ip and port to access the deployment outside of kubernetes cluster kubectl get svc

    Now copy external ip and port for service of type LoadBalancer

  10. Paste ip:PORT into browser