Skip to main content

Microservice Applications in Kubernetes

Course

Intro Video

Photo of Matthew Pearson

Matthew Pearson

Linux Training Architect II in Content

I recently joined Linux Academy as a Linux Training Architect. I have been a linux engineer for many years with a focus in middleware and highly available applications. I posses several linux certifications, including the Red Hat Certified Engineer. I am excited to be a part of this team and to help students grow and succeed in all areas of IT!

Length

04:47:00

Difficulty

Intermediate

Videos

19

Hands-on Labs

3

Course Details

Welcome to the Microservice Applications in Kubernetes course! This course is designed to give you hands on experience with installing and administering a complex microservice application in a Kubernetes cluster. The course will begin with an overview of Kubernetes conceptually and then move on to installing a functioning Kubernetes cluster. Once the cluster has been bootstrapped, we will learn how to install a simple microservice and then install a more complex microservice application that we will be working with throughout the remainder of the course. Using this microservice application, we will work through the various components and features of Kubernetes like service discovery and autoscaling. Working through this course will give you hands on experience with the microservice architecture and show you why this method has become one of the most sought after in the IT industry.

Download the Interactvie Diagram here: https://interactive.linuxacademy.com/diagrams/LearnMicroServicesByDoing.html

Syllabus

Introduction

Introduction

Course Introduction

00:01:33

Lesson Description:

Welcome to the Learn Microservices by Doing course. This video is a brief overview of the course content and the topics that we will cover.

About the Author

00:00:27

Lesson Description:

Learn a little more about the training architect, Matthew Pearson.

Course Tools and Resources

00:01:49

Lesson Description:

In addition to the video lessons, several other tools and resources are provided to aid you in your studies. In this video, we will discuss the tools and resources that are available.

Kubernetes Overview

00:06:44

Lesson Description:

Kubernetes has several components that work together to make installing and managing applications incredibly straightforward. In this lesson, we will go over a high-level view of Kubernetes and the various components that drive this incredible technology. Interactive Diagram: https://linuxacademy.com/cp/guides/download/refsheets/guides/refsheets/learn-microservices-by-doing-interactive-diagram_1548699939.pdf

Configuring a Kubernetes Cluster

Configure Cloud Servers

00:04:56

Lesson Description:

The new Cloud Playground at Linux Academy is a fantastic tool for spinning up cloud servers and practicing all the things you are learning in your courses. In this lesson, we will go over some of the new features provided by Cloud Playground and configure our cloud servers for this course. **UPDATE - Now that cloud playground is out of beta some of the options have changed.

Docker Installation and Overview

00:06:59

Lesson Description:

Docker is a containerization technology that allows you to package and run applications in loosely isolated environments called containers. For our Kubernetes cluster, we will be using Docker as our container runtime. In this lesson, we will go through a brief overview of Docker and then install Docker CE 18.06.1 to our cluster nodes. Installation Steps: Add GPG key: # curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add - Add Docker repository: # sudo add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable" Update packages: # sudo apt-get update Install Docker: # sudo apt-get install -y docker-ce=18.06.1~ce~3-0~ubuntu

Installing Kubeadm, Kubelet, and Kubectl

00:08:42

Lesson Description:

**Important: Due to an issue introduced by a recent security update, the kubernetes binaries need to use version1.12.7-00 instead of 1.12.2-00. Please see instalation instructions below. Kubeadm, kubelet, and kubectl are important components for our implementation of Kubernetes. Kubeadm provides a streamlined way to bootstrap a kubernetes cluster. Kubelet is the agent that runs on the cluster nodes and performs various actions on the components of the cluster. Then we have kubectl, which is the command line utility for interacting and managing the cluster. In this lesson, we will discuss each of these components and install them on our cluster nodes. Installation Instructions:Add the GPG key: # curl -s https://packages.cloud.google.com/apt/doc/apt-key.gpg | sudo apt-key add -Add the Kubernetes repository:

# cat << EOF | sudo tee /etc/apt/sources.list.d/kubernetes.list
deb https://apt.kubernetes.io/ kubernetes-xenial main
EOF
Resynchronize the package index: # sudo apt-get updateInstall the required packages: # sudo apt-get install -y kubelet=1.12.7-00 kubeadm=1.12.7-00 kubectl=1.12.7-00Prevent packages from being automatically updated: # sudo apt-mark hold kubelet kubeadm kubectl

Bootstrap the Kubernetes Cluster

00:05:31

Lesson Description:

The kubeadm command was developed to provide best practices for initializing a Kubernetes cluster and for joining nodes to the cluster. In this lesson, we will be using the kubeadm command to bootstrap our kubernetes cluster and then join our cloud servers to the cluster. Installation Steps: Initialize the Cluster on the Master: # sudo kubeadm init --pod-network-cidr=10.244.0.0/16 Set up kubeconfig for a Local User on the Master # mkdir -p $HOME/.kube # sudo cp -i /etc/kubernetes/admin.conf $HOME/.kube/config # sudo chown $(id -u):$(id -g) $HOME/.kube/config Join Nodes to the Cluster # sudo kubeadm join $controller_private_ip:6443 --token $token --discovery-token-ca-cert-hash $hash

Configure Cluster Network with Flannel

00:04:09

Lesson Description:

In Kubernetes, the communication between pods occurs on the cluster network. To set up the cluster network, install the network add-on after bootstrapping the cluster. In this lesson, we will prepare the cluster nodes for the cluster network and then install the Flannel network add on. Install the Flannel Network Addon(on all nodes) Add net.bridge.bridge-nf-call-iptables=1 to sysctl.conf. # echo "net.bridge.bridge-nf-call-iptables=1" | sudo tee -a /etc/sysctl.conf(on all nodes) Apply the change made to sysctl.conf # sudo sysctl -p(on Master) Use kubectl to install Flannel using YAML template. # kubectl apply -f https://raw.githubusercontent.com/coreos/flannel/bc79dd1505b0c8681ece4de4c0d86c5cd2643275/Documentation/kube-flannel.yml

Hands-on Labs are real live environments that put you in a real scenario to practice what you have learned without any other extra charge or account to manage.

01:00:00

Working with Microservices

What are Microservices?

00:04:11

Lesson Description:

Microservice architecture has become a very appealing model that many companies are trying to adopt. In this video, we will try to answer the question “What are microservices?”, and talk about some benefits of microservices architecture.

Installing a Single Application to the Cluster

00:09:58

Lesson Description:

The Kubernetes command line utility, kubectl, provides a streamlined way to interact with the cluster and manage applications. In this lesson, we will discuss namespaces and pods, and then install an application to our Kubernetes cluster.

Installing a Microservice Application to the Cluster

00:08:21

Lesson Description:

In this lesson, we will install a complex microservice application provided by WeaveWorks. This microservice application will be our main subject of study as we continue the course. We will work with this application as we walk through some of the main features provided by Kubernetes.

Kubernetes API

00:04:41

Lesson Description:

The Kubernetes API is the main gateway for interacting with the Kubernetes cluster. In this lesson, we will discuss the API server and interacting with it to gain information about our cluster.

Service Discovery

00:07:56

Lesson Description:

Service discovery is the process of automatically detecting available services and how to connect to them. In this lesson, we will go over the different methods of service discovery in Kubernetes and also work with the cluster DNS server.

Replication

00:03:56

Lesson Description:

Kubernetes uses replication to create multiple instances of an application across the cluster. In this video, we will discuss replication and talk about the differences between replication controllers, replica sets, and deployments.

Ingress

00:08:08

Lesson Description:

In reference to Kubernetes, Ingress is an API object that manages external access to services in the cluster. In this lesson, we will discuss Ingress and work with a NodePort service that will provide access to the cluster.

Scaling Microservices

00:07:15

Lesson Description:

The ability to scale the individual components of a microservice application is one of the great features that Kubernetes offers. In this lesson, we walk through manually and automatically scaling microservices in our cluster.

Self Healing

00:09:25

Lesson Description:

Self-healing is the ability of the Kubernetes cluster to recover from service or node failure automatically. In this video, we discuss and show the benefit of using replication for your microservices and the way that the Kubernetes cluster can automatically recover from a service failure.

Hands-on Labs are real live environments that put you in a real scenario to practice what you have learned without any other extra charge or account to manage.

01:00:00

Hands-on Labs are real live environments that put you in a real scenario to practice what you have learned without any other extra charge or account to manage.

01:00:00

What's Next

Next Steps

00:02:11

Lesson Description:

Congratulations on completing the course! In this video, we will go over some of the other available content at Linux Academy and how to search for it.