Application Deployment

Lesson Contents:

In this lesson, we will cover the steps for manually deploying the demo setup for XC WAF on CE. So, as we discussed in the previous lesson, let us first create an AKS cluster and deploy our demo application. 

  • Create a resource group, if you have recently searched for a specific service, you will get the recommendation without giving a search, if not, use search bar. Now, click on create button, once page is loaded, select your subscription, enter a resource-group name, remember! do not use existing resource group name in the same subscription. Select a region and click "review + create" and later create button, open the created resource group, You can see, there is no resource available at this time.
  • Now, search for virtual networks service from the search bar. Again, click on create button, select your subscription, search for the created resource group and, select it. Add a virtual network name, and verify the region. Navigate to IP addresses tab, you can use the default network address space and subnet or can customize it as per your need. In this demo, we are modifying the default network address and subnet, and adding "172.16.0.0" series IP range for deploying our compute resource to host our application. Once done, click on save button, navigate to "Review + create" tab, let the page load, after validation finishes, click on create button, wait for the deployment to get succeeded, it may take a little time to show the status of the deployment, once deployment succeeds, click on "Go to resource button" and verify the address space in the overview section of the deployment and click subnets to verify the subnet details.
  • Now, search for kubernetes service and select it, click on create button, select create a kubernetes cluster, wait for the page to load, once page loads, repeat the same steps as we did earlier for the v-net creation, as in, choose your subscription and select the created resource group, since it is a demo scenario, we have selected Dev Test cluster configuration, now, give a name to the cluster, verify the region and select a kubernetes version, we have selected the default. Now, Navigate to Node pools, for our requirement, we don't want auto-scaling of nodes so we will select manual for scale method field and set minimum node count to 1, you could also change max pods allowed field as per your need, but we are keeping it to default, click on update. Now, navigate to networking tab, and check the box for Bring your own virtual network field, select the virtual network that we have created earlier, scroll down then click next buttons to navigate to the Monitoring section of the configuration. Here, we are setting Azure monitor option off as we don't need it for this demo, and at last navigate to "Review + Create" and click on create button, wait for the deployment to get succeeded, It will take a couple of minutes to bring the Azure kubernetes cluster up! . Just for a reminder! our kubernetes cluster is getting deployed with 1 worker node which will be managed by Azure that will help in reducing the additional operational overhead as Azure will take care of all the critical tasks related to managing the kubernetes cluster. Once the deployment is successful, click on go to resource button, now in the overview section click on connect button. Here, we are using cloud shell to run the Azure CLI commands for connection. 
    Cloud shell already has Azure CLI and kubectl tools installed. You can also use your local machine to install these tools and run commands from their.
  • Once connect command is executed kubeconfig file will get updated with the access details of the created cluster. Let's run "kubectl get nodes -o wide" command to fetch node details of our cluster. Here you can see, the node has got one IP from the subnet range configured.
  • Now, we will copy the YAML manifest file of demo application to the current directory and push it to the cluster by running kubectl apply command. It will create the resources in the cluster, wait for the deployments and services to get created and run kubectl get pods command. Here, you can see pods are not in ready state, after a few seconds let's again try and run the same command to check the status of pods, and yes! the pods are now running. Great!

Complete and Continue