Deploying Frontend Demo

The course is part of these learning paths

AZ-303 Exam Preparation: Technologies for Microsoft Azure Architects
course-steps
28
certification
4
lab-steps
13
description
1
AZ-400 Exam Prep: Microsoft Azure DevOps Solutions
course-steps
18
certification
1
lab-steps
5
description
1
AZ-104 Exam Preparation: Microsoft Azure Administrator
course-steps
20
certification
2
lab-steps
16
play-arrow
Start course
Overview
DifficultyIntermediate
Duration1h 42m
Students1482
Ratings
3.7/5
starstarstarstar-halfstar-border

Description

AKS is a super-charged Kubernetes managed service which makes creating and running a Kubernetes cluster a breeze!

This course explores AKS, Azure’s managed Kubernetes service, covering the fundamentals of the service and how it can be used. You’ll first learn about how as a managed service it takes care of managing and maintaining certain aspects of itself, before moving onto the core AKS concepts such as cluster design and provisioning, networking, storage management, scaling, and security. After a quick look at Azure Container Registry, the course then moves on to an end-to-end demonstration that shows how to provision a new AKS cluster and then deploy a sample cloud-native application into it.

For any feedback, queries, or suggestions relating to this course, please contact us at support@cloudacademy.com.

Learning Objectives

  • Learn about what AKS is and how to provision, configure and maintain an AKS cluster
  • Learn about AKS fundamentals and core concepts
  • Learn how to work with and configure many of the key AKS cluster configuration settings
  • And finally, you’ll learn how to deploy a fully working sample cloud-native application into an AKS cluster

Intended Audience

  • Anyone interested in learning about AKS and its fundamentals
  • Software Engineers interested in learning about how to configure and deploy workloads into an AKS cluster
  • DevOps and SRE practitioners interested in understanding how to manage and maintain an AKS cluster

Prerequisites

To get the most from this course it would help to have a basic understanding of:

  • Kubernetes (if you’re unfamiliar with Kubernetes, and/or require a refresher then please consider taking our dedicated Introduction to Kubernetes learning path)
  • Containers, containerization, and microservice-based architectures
  • Software development and the software development life cycle
  • Networks and networking

Resources

If you wish to follow along with the demonstrations in part two of this course, you can find all of the coding assets hosted in the following three GitHub repositories:

Transcript

So, moving on to step seven, we're now ready to deploy the frontend. So the frontend consists of a frontend ingress, a frontend service, and then a frontend deployment. Now once all of this is in place, what this will give us is, when we make a request to the frontend, fully-qualified domain name, we'll get the HTML, Java Script, and CSS assets, all being passed back and rendered within the browser.

So, let's move on and perform the deployment. So step 7.1, I'll just copy this, I'll clear the terminal I'll do a paste.

Step 7.2 requires us to create a service for the frontend.

And then, step 7.3, we set up our ingress resource. Again, notice that the highest attribute is set to use this variable. So if we echo this out, this is our fully-qualified domain name for our frontend. So I'll now go here and deploy the frontend ingress.

Under step 7.4 we can look at the rollout for the frontend deployment just to ensure that it's been completed, which it has. We can then look at the pods, and this time we should see four pods for the frontend, four pods for the API and three pods for the MongoDB stable set, which we do. So there are out new four frontend pods.

Okay, under step 7.5 I'm simply going to run the following kill command to test the frontend and to display the HTTP headers and their response. And if I get a 200 back, then that tells me everything is up and running. And I do, so that looks good. I'll then run the next command and this will show me the HTTP headers along with the body. And we can see in the body that we look like we're getting HTML and JavaScript.

So the final thing to do here is to actually now jump into the browser and test out the application. So I'll now echo out the frontend host name, I'll swap over into Chrome, and I'll simply bring up a new tab and excellent, we've got the frontend up and running. And the fact that we've got each of the languages rendered as well means that this data is coming from the MongoDB database.

So everything has been wired up successfully, so this is a great result. From here, we can actually vote on each of the languages. And when we do this, this generates a AJAX request which goes to the API servers which is hosted in our AKS cluster. And then the API writes that data into the MongoDB backend, which is also hosted in the cluster.

Okay, if we jump back into Visual Studio Code, I'll clear the terminal, and I'll move on to step eight. And if I run this command, we're going to test that the two votes that I made in the frontend have actually been wrote into the database. Okay, so the data has come back. If we scroll up, we can indeed see one vote for Python and one vote for C#. So, perfect result.

About the Author
Students41634
Labs34
Courses94
Learning paths28

Jeremy is the DevOps Content Lead at Cloud Academy where he specializes in developing technical training documentation for DevOps.

He has a strong background in software engineering, and has been coding with various languages, frameworks, and systems for the past 20+ years. In recent times, Jeremy has been focused on DevOps, Cloud, Security, and Machine Learning.

Jeremy holds professional certifications for both the AWS and GCP cloud platforms.