Search icon CANCEL
Subscription
0
Cart icon
Your Cart (0 item)
Close icon
You have no products in your basket yet
Save more on your purchases! discount-offer-chevron-icon
Savings automatically calculated. No voucher code required.
Arrow left icon
All Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Newsletter Hub
Free Learning
Arrow right icon
timer SALE ENDS IN
0 Days
:
00 Hours
:
00 Minutes
:
00 Seconds
Hands-On Kubernetes on Azure
Hands-On Kubernetes on Azure

Hands-On Kubernetes on Azure: Run your applications securely and at scale on the most widely adopted orchestration platform

Arrow left icon
Profile Icon Gopalakrishnan Profile Icon Lenz
Arrow right icon
$12.99 per month
Full star icon Full star icon Full star icon Empty star icon Empty star icon 3 (2 Ratings)
Paperback Mar 2019 258 pages 1st Edition
eBook
$29.99
Paperback
$43.99
Subscription
Free Trial
Renews at $12.99p/m
Arrow left icon
Profile Icon Gopalakrishnan Profile Icon Lenz
Arrow right icon
$12.99 per month
Full star icon Full star icon Full star icon Empty star icon Empty star icon 3 (2 Ratings)
Paperback Mar 2019 258 pages 1st Edition
eBook
$29.99
Paperback
$43.99
Subscription
Free Trial
Renews at $12.99p/m
eBook
$29.99
Paperback
$43.99
Subscription
Free Trial
Renews at $12.99p/m

What do you get with a Packt Subscription?

Free for first 7 days. $15.99 p/m after that. Cancel any time!
Product feature icon Unlimited ad-free access to the largest independent learning library in tech. Access this title and thousands more!
Product feature icon 50+ new titles added per month, including many first-to-market concepts and exclusive early access to books as they are being written.
Product feature icon Innovative learning tools, including AI book assistants, code context explainers, and text-to-speech.
Product feature icon Thousands of reference materials covering every tech concept you need to stay up to date.
Subscribe now
View plans & pricing
Table of content icon View table of contents Preview book icon Preview Book

Hands-On Kubernetes on Azure

Introduction to Docker and Kubernetes

The perfect storm – that is how the current state of the software development world can be described. The sources of this storm are as follows:

  • Open source software (OSS): This provides a foundational framework that makes almost any software possible.
  • Technology and architecture advancements: This enables the orchestration of loosely coupled systems that consist of micro applications leveraging microservices, micro frontends, and multiple databases.
  • Public clouds: For instance, Azure, AWS, and Google Cloud – these provide scalable infrastructure for a company of any size.
  • Containerization and orchestration: For instance, Docker and Kubernetes – making DevOps culture possible.

Azure Kubernetes Service (AKS) packages and manages the complexity of putting together all of the preceding sources for you. As an engineer, it...

Technical requirements

You will need a modern web browser, such as Chrome, Firefox, or Edge, for this chapter.

The foundational technologies that enable AKS

The combination of OSS, public cloud, and containerization gives a developer a virtually unlimited number of compute power combined with the ability of rapidly composing applications that deliver more than the sum of the individual parts. The individual parts that make up an application generally do only one thing, and do it well (take, for instance, the Unix philosophy).

The developer is now able to architect applications that are deployed as microservices. When done right, microservices, such as SOA, enable quick feedback during development, testing, and deployment. Microservices are not a free lunch and has various problems, which are listed in the 2014 article—Microservices - Not A Free Lunch! (you can read this article at http://highscalability.com/blog/2014/4/8/microservices-not-a-free-lunch.html). With the technologies we listed earlier, developers have the power of having their cake and eating it too, as more and more of the not free lunch part is available as managed services, such as AKS. The public cloud providers are competing by investing in managed services to become the go-to provider for developers.

You build it, you run it

Even with more managed services coming to relieve the burden on the developer and operator, developers need to know the underlying workings of these services to make effective use of them in production. Just as developers write automated tests, future developers will be expected to know how their application can be delivered quickly and reliably to the customer.

Operators will take the hints from the developer specs and deliver them a stable system – whose metrics can be used for future software development, thus completing the virtuous cycle.

Developers owning the responsibility of running the software that they develop instead of throwing it over the wall for operations is a change in mindset that has origins in Amazon (https://www.slideshare.net/ufried/the-truth-about-you-build-it-you-run-it).

The advantages of the DevOps model not only change the responsibilities of the operations and development teams—it also changes the business side of organizations. The foundation of DevOps can enable businesses to accelerate the time to market significantly if combined with a lean and agile process and operations model.

Everything is a file

Microservices, Docker, and Kubernetes can get quickly overwhelming for anyone. We can make it easier for ourselves by understanding the basics. It would be an understatement to say that understanding the fundamentals is critical to performing root cause analysis on production problems.

Any application is ultimately a process that is running on an operating system (OS). The process requires the following to be usable:

  • Compute (CPU)
  • Memory (RAM)
  • Storage (disk)
  • Network (NIC)

Launch the online Linux Terminal emulator at https://bellard.org/jslinux/vm.html?url=https://bellard.org/jslinux/buildroot-x86.cfg. Then, type the ls command, as follows:

This command lists the files in the current directory (which happens to be the root user's home directory).

Congratulations, you have launched your first container!

Well, obviously, this is not really the case. In principle, there is no difference between the command you ran versus launching a container.

So, what is the difference between the two? The clue lies in the word, contain. The ls process has very limited containment (it is limited only by the rights that the user has). ls can potentially see all files, has access to all the memory, network, and the CPU that's available to the OS.

A container is contained by the OS by controlling access to computing, memory, storage, and network. Each container runs in its own namespace(https://medium.com/@teddyking/linux-namespaces-850489d3ccf). The rights of the namespace processes are controlled by control groups (cgroups). 

Every container process has contained access via cgroups and namespaces, which makes it look (from the container process perspective) as if it is running as a complete instance of an OS. This means that it appears to have its own root filesystem, init process (PID 1), memory, compute, and network.

Since running containers is just a set of processes, it makes it extremely lightweight and fast, and all the tools that is used to debug and monitor processes can be used out of the box.

You can play with Docker by creating a free Docker Hub account at Docker Hub (https://hub.docker.com/) and using that login at play with Docker (https://labs.play-with-docker.com/).

First, type docker run -it ubuntu. After a short period of time, you will get a prompt such as root@<randomhexnumber>:/#. Next, type exit, and run the docker run -it ubuntu command again. You will notice that it is super fast! Even though you have launched a completely new instance of Ubuntu (on a host that is probably running alpine OS), it is available instantly. This magic is, of course, due to the fact that containers are nothing but regular processes on the OS. Finally, type exit to complete this exercise. The full interaction of the session on play with Docker (https://labs.play-with-docker.com/) is shown in the following script for your reference. It demonstrates the commands and their output:

docker run -it ubuntu # runs the standard ubuntu linux distribution as a container

exit # the above command after pulling it from dockerhub will put you into the shell of the container. exit command gets you out of the container

docker run -it ubuntu # running it again shows you how fast launching a container is. (Compare it to launching a full blown Virtual Machine (VM), booting a computer)

exit # same as above, gets you out of the container

The following content displays the output that is produced after implementing the preceding commands:

###############################################################
# WARNING!!!! #
# This is a sandbox environment. Using personal credentials #
# is HIGHLY! discouraged. Any consequences of doing so are #
# completely the user's responsibilites. #
# #
# The PWD team. #
###############################################################
[node1] (local) [email protected] ~
$ docker ps
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
[node1] (local) [email protected] ~
$ date
Mon Oct 29 05:58:25 UTC 2018
[node1] (local) [email protected] ~
$ docker run -it ubuntu
Unable to find image 'ubuntu:latest' locally
latest: Pulling from library/ubuntu
473ede7ed136: Pull complete
c46b5fa4d940: Pull complete
93ae3df89c92: Pull complete
6b1eed27cade: Pull complete
Digest: sha256:29934af957c53004d7fb6340139880d23fb1952505a15d69a03af0d1418878cb
Status: Downloaded newer image for ubuntu:latest
root@03c373cb2eb8:/# exit
exit
[node1] (local) [email protected] ~
$ date
Mon Oct 29 05:58:41 UTC 2018
[node1] (local) [email protected] ~
$ docker run -it ubuntu
root@4774cbe26ad7:/# exit
exit
[node1] (local) [email protected] ~
$ date
Mon Oct 29 05:58:52 UTC 2018
[node1] (local) [email protected] ~

Orchestration

An individual can rarely perform useful work alone; teams that communicate securely and well can generally accomplish more.

Just like people, containers need to talk to each other and they need help in organizing their work. This activity is called orchestration.

The current leading orchestration framework is Kubernetes (https://kubernetes.io/). Kubernetes was inspired by the Borg project in Google, which, by itself, was running millions of containers in production. Incidentally, cgroups' initial contribution came from Google developers.

Kubernetes takes the declarative approach to orchestration; that is, you specify what you need and Kubernetes takes care of the rest.

Underlying all this magic, Kubernetes still launches the Docker containers, like you did previously. The extra work involves details such as networking, attaching persistent storage, handling the container, and host failures.

Remember, everything is a process!

Summary

In this chapter, we introduced the concepts of Docker and Kubernetes. This provides the common context for the following chapters, where we will dive into how to deploy Dockerized applications in Microsoft AKS. You will see how the AKS PaaS offering from Microsoft streamlines deployment by taking on many of the management and operational tasks that you may have to do yourself if you manage and operate the Kubernetes infrastructure. 

In the next chapter, we will introduce the Azure Portal and its components in the context of managing AKS.

Left arrow icon Right arrow icon
Download code icon Download Code

Key benefits

  • Deploy highly scalable applications with Kubernetes on Azure
  • Learn to scale your application infrastructure dynamically with Azure Kubernetes Service (AKS)
  • Increase the efficiency of container orchestration service on the cloud

Description

Microsoft is now one of the most significant contributors to Kubernetes open source projects. Kubernetes helps to create, configure, and manage a cluster of virtual machines that are preconfigured to run containerized applications. This book will be your guide to performing successful container orchestration and deployment of Kubernetes clusters on Azure. You will get started by learning how to deploy and manage highly scalable applications, along with understanding how to set up a production-ready Kubernetes cluster on Azure. As you advance, you will learn how to reduce the complexity and operational overheads of managing a Kubernetes cluster on Azure. By the end of this book, you will not only be capable of deploying and managing Kubernetes clusters on Azure with ease, but also have the knowledge of best practices for working with advanced AKS concepts for complex systems.

Who is this book for?

If you’re a cloud engineer, cloud solution provider, system administrator, site reliability engineer, or a developer interested in DevOps and are looking for an extensive guide to running Kubernetes in the Azure environment, then this book is for you. Although previous knowledge of Kubernetes is not expected, some experience with Linux and Docker containers would be beneficial.

What you will learn

  • Use the Kubernetes dashboard to review clusters and deployed applications
  • Find out the benefits and limitations, and how to avoid potential problems while using AKS
  • Understand the implementation of Microsoft toolchains such as Visual Studio Code and Git
  • Implement simple and advanced AKS solutions
  • Ensure automated scalability and high reliability of your applications with Microsoft AKS
  • Apply kubectl commands to monitor applications

Product Details

Country selected
Publication date, Length, Edition, Language, ISBN-13
Publication date : Mar 30, 2019
Length: 258 pages
Edition : 1st
Language : English
ISBN-13 : 9781789536102
Vendor :
Google
Tools :

What do you get with a Packt Subscription?

Free for first 7 days. $15.99 p/m after that. Cancel any time!
Product feature icon Unlimited ad-free access to the largest independent learning library in tech. Access this title and thousands more!
Product feature icon 50+ new titles added per month, including many first-to-market concepts and exclusive early access to books as they are being written.
Product feature icon Innovative learning tools, including AI book assistants, code context explainers, and text-to-speech.
Product feature icon Thousands of reference materials covering every tech concept you need to stay up to date.
Subscribe now
View plans & pricing

Product Details

Publication date : Mar 30, 2019
Length: 258 pages
Edition : 1st
Language : English
ISBN-13 : 9781789536102
Vendor :
Google
Tools :

Packt Subscriptions

See our plans and pricing
Modal Close icon
$12.99 billed monthly
Feature tick icon Unlimited access to Packt's library of 6,500+ practical books and videos
Feature tick icon Constantly refreshed with 50+ new titles a month
Feature tick icon Exclusive Early access to books as they're written
Feature tick icon Solve problems while you work with advanced search and reference features
Feature tick icon Offline reading on the mobile app
Feature tick icon Simple pricing, no contract
$129.99 billed annually
Feature tick icon Unlimited access to Packt's library of 6,500+ practical books and videos
Feature tick icon Constantly refreshed with 50+ new titles a month
Feature tick icon Exclusive Early access to books as they're written
Feature tick icon Solve problems while you work with advanced search and reference features
Feature tick icon Offline reading on the mobile app
Feature tick icon Choose a DRM-free eBook or Video every month to keep
Feature tick icon PLUS own as many other DRM-free eBooks or Videos as you like for just $5 each
Feature tick icon Exclusive print discounts
$179.99 billed in 18 months
Feature tick icon Unlimited access to Packt's library of 6,500+ practical books and videos
Feature tick icon Constantly refreshed with 50+ new titles a month
Feature tick icon Exclusive Early access to books as they're written
Feature tick icon Solve problems while you work with advanced search and reference features
Feature tick icon Offline reading on the mobile app
Feature tick icon Choose a DRM-free eBook or Video every month to keep
Feature tick icon PLUS own as many other DRM-free eBooks or Videos as you like for just $5 each
Feature tick icon Exclusive print discounts

Frequently bought together


Stars icon
Total $ 140.97
Azure Networking Cookbook
$38.99
Hands-On Kubernetes on Azure
$43.99
Hands-On Azure for Developers
$57.99
Total $ 140.97 Stars icon
Visually different images

Table of Contents

11 Chapters
Introduction to Docker and Kubernetes Chevron down icon Chevron up icon
Kubernetes on Azure (AKS) Chevron down icon Chevron up icon
Application Deployment on AKS Chevron down icon Chevron up icon
Scaling Your Application to Thousands of Deployments Chevron down icon Chevron up icon
Single Sign-On with Azure AD Chevron down icon Chevron up icon
Monitoring the AKS Cluster and the Application Chevron down icon Chevron up icon
Operation and Maintenance of AKS Applications Chevron down icon Chevron up icon
Connecting an App to an Azure Database - Authorization Chevron down icon Chevron up icon
Connecting to Other Azure Services (Event Hub) Chevron down icon Chevron up icon
Securing AKS Network Connections Chevron down icon Chevron up icon
Serverless Functions Chevron down icon Chevron up icon

Customer reviews

Rating distribution
Full star icon Full star icon Full star icon Empty star icon Empty star icon 3
(2 Ratings)
5 star 0%
4 star 50%
3 star 0%
2 star 50%
1 star 0%
NK Desi in CA May 20, 2019
Full star icon Full star icon Full star icon Full star icon Empty star icon 4
In the fast changing world of Kubernetes and especially AKS, this is a welcome book for step-by-step instructions on navigating the hard waters. Author's promise of keeping the steps updated on github is also reassuring to keep up with changes. If you are looking for in-depth tech fundamentals, I'm sure there will be tons of resources, but for a hands-on AKS know-how.....good book to get started.
Amazon Verified review Amazon
gabe k Apr 10, 2019
Full star icon Full star icon Empty star icon Empty star icon Empty star icon 2
I purchased this book after reading some very detailed books on both Docker and Kubernetes. I specifically bought this to understand the AKS (Azure) specific aspects of K8S implementations. I found that the book's approach is more of a "follow these steps and it works" approach rather than explaining what you are actually being instructed to do. I would also say that the vast majority of examples do not work and required me to search for the proper example online. Problems with the examples ranged from using older libraries that are no longer supported or compatible, permission issues specific to AKS requiring prior remediation, misspellings of commands (e.g. kubctl instead of kubectl) and a number of other issues. There is also a chapter dedicated to OMS which is being deprecated at the time of this writing. In all honesty though, it was the only AKS specific book that I could find and I did get information out of it that pointed me in the right direction if you're willing to do the research yourself.
Amazon Verified review Amazon
Get free access to Packt library with over 7500+ books and video courses for 7 days!
Start Free Trial

FAQs

What is included in a Packt subscription? Chevron down icon Chevron up icon

A subscription provides you with full access to view all Packt and licnesed content online, this includes exclusive access to Early Access titles. Depending on the tier chosen you can also earn credits and discounts to use for owning content

How can I cancel my subscription? Chevron down icon Chevron up icon

To cancel your subscription with us simply go to the account page - found in the top right of the page or at https://subscription.packtpub.com/my-account/subscription - From here you will see the ‘cancel subscription’ button in the grey box with your subscription information in.

What are credits? Chevron down icon Chevron up icon

Credits can be earned from reading 40 section of any title within the payment cycle - a month starting from the day of subscription payment. You also earn a Credit every month if you subscribe to our annual or 18 month plans. Credits can be used to buy books DRM free, the same way that you would pay for a book. Your credits can be found in the subscription homepage - subscription.packtpub.com - clicking on ‘the my’ library dropdown and selecting ‘credits’.

What happens if an Early Access Course is cancelled? Chevron down icon Chevron up icon

Projects are rarely cancelled, but sometimes it's unavoidable. If an Early Access course is cancelled or excessively delayed, you can exchange your purchase for another course. For further details, please contact us here.

Where can I send feedback about an Early Access title? Chevron down icon Chevron up icon

If you have any feedback about the product you're reading, or Early Access in general, then please fill out a contact form here and we'll make sure the feedback gets to the right team. 

Can I download the code files for Early Access titles? Chevron down icon Chevron up icon

We try to ensure that all books in Early Access have code available to use, download, and fork on GitHub. This helps us be more agile in the development of the book, and helps keep the often changing code base of new versions and new technologies as up to date as possible. Unfortunately, however, there will be rare cases when it is not possible for us to have downloadable code samples available until publication.

When we publish the book, the code files will also be available to download from the Packt website.

How accurate is the publication date? Chevron down icon Chevron up icon

The publication date is as accurate as we can be at any point in the project. Unfortunately, delays can happen. Often those delays are out of our control, such as changes to the technology code base or delays in the tech release. We do our best to give you an accurate estimate of the publication date at any given time, and as more chapters are delivered, the more accurate the delivery date will become.

How will I know when new chapters are ready? Chevron down icon Chevron up icon

We'll let you know every time there has been an update to a course that you've bought in Early Access. You'll get an email to let you know there has been a new chapter, or a change to a previous chapter. The new chapters are automatically added to your account, so you can also check back there any time you're ready and download or read them online.

I am a Packt subscriber, do I get Early Access? Chevron down icon Chevron up icon

Yes, all Early Access content is fully available through your subscription. You will need to have a paid for or active trial subscription in order to access all titles.

How is Early Access delivered? Chevron down icon Chevron up icon

Early Access is currently only available as a PDF or through our online reader. As we make changes or add new chapters, the files in your Packt account will be updated so you can download them again or view them online immediately.

How do I buy Early Access content? Chevron down icon Chevron up icon

Early Access is a way of us getting our content to you quicker, but the method of buying the Early Access course is still the same. Just find the course you want to buy, go through the check-out steps, and you’ll get a confirmation email from us with information and a link to the relevant Early Access courses.

What is Early Access? Chevron down icon Chevron up icon

Keeping up to date with the latest technology is difficult; new versions, new frameworks, new techniques. This feature gives you a head-start to our content, as it's being created. With Early Access you'll receive each chapter as it's written, and get regular updates throughout the product's development, as well as the final course as soon as it's ready.We created Early Access as a means of giving you the information you need, as soon as it's available. As we go through the process of developing a course, 99% of it can be ready but we can't publish until that last 1% falls in to place. Early Access helps to unlock the potential of our content early, to help you start your learning when you need it most. You not only get access to every chapter as it's delivered, edited, and updated, but you'll also get the finalized, DRM-free product to download in any format you want when it's published. As a member of Packt, you'll also be eligible for our exclusive offers, including a free course every day, and discounts on new and popular titles.