Kubernetes Microservices

Tags:

Use Kubernetes to deploy a Microservice architecture. You'll deploy, manage and monitor a live Kubernetes cluster.

Last updated 2022-01-10 | 4.7

- Deploy containers to a Kubernetes Cluster
- Run Kubernetes in AWS using either EKS or Kops
- Monitor a live Kubernetes cluster using Prometheus and Grafana

What you'll learn

Deploy containers to a Kubernetes Cluster
Run Kubernetes in AWS using either EKS or Kops
Monitor a live Kubernetes cluster using Prometheus and Grafana
Analyse system-wide logs using the ELK Stack (ElasticStack); Kibana and ElasticSearch
Handle Alerts in a Kubernetes cluster by notifying Slack Channels
Understand how Requests and Limits work in Kubernetes
Use Kubernetes Horizontal Pod Autoscaling
Configure Ingress Control on a live Kubernetes deployment
Understand Kubernetes StatefulSets
Integrate Kubernetes with a Continuous Deployment System (CD)
Use Helm to Manage Charts and to Dynamically Update your Kubernetes YAML

* Requirements

* Some previous knowledge of Docker is useful
* but an overview is provided as part of the course
* Previous knowledge of AWS is useful for the later sections of the course; however all the concepts are explained in detail and this would serve as a great first project on AWS
* We'll be using the terminal throughout the course so some (basic) familiarity of terminal operations is assumed
* You will need a modern computer with at least 8Gb of RAM to run the practical sessions

Description

  • Deploy containers to a Kubernetes Cluster
  • Run Kubernetes in AWS using either EKS or Kops
  • Monitor a live Kubernetes cluster using Prometheus and Grafana
  • Analyse system-wide logs using the ELK Stack (ElasticStack); Kibana and ElasticSearch
  • Handle Alerts in a Kubernetes cluster by notifying Slack Channels
  • Understand how Requests and Limits work in Kubernetes
  • Use Kubernetes Horizontal Pod Autoscaling
  • Configure Ingress Control on a live Kubernetes deployment
  • Understand Kubernetes StatefulSets
  • Integrate Kubernetes with a Continuous Deployment System (CD)
  • Use Helm to Manage Charts and to Dynamically Update your Kubernetes YAML

Course content

35 sections • 173 lectures

Introduction to Kubernetes Microservices course Preview 03:05

Code for the course Preview 00:28

Support for Apple M1 users Preview 00:30

Extra note for Linux Users Preview 00:18

If you already have Docker installed... Preview 01:41

In the upcoming videos, we're going to install minikube, which is an excellent way to work with Kubernetes locally.

Minikube usually uses a Virtual Machine image which contains a full Kubernetes distribution. This works quite well, but as you'll see, it can be a pain to set up. You don't need to install Docker to use minikube, as minikube ships with its own Docker installation inside it.

However: if you already have Docker installed and running, then you now have an alternative available, called the "Docker Driver". This runs minikube inside a docker container. If you don't have Docker installed, don't worry, you can just follow the upcoming videos.

The advantage of the Docker driver: there's no need to set up any virtual machines and because minikube is a docker container, it is much more likely to run without problems. 80% of our support calls for this course are problems with virtualization and local environment problems!

There is one minor disadvantage, which I'll come to shortly...

To use the docker driver

  1. Go straight to the video called "Installing kubectl and minikube".

  2. Once minikube is installed, ensure Docker is running

  3. Now start minikube with the command "minikube start --memory 4096 --driver docker". Actually, you don't need the --driver argument, because the docker driver becomes the default when you have Docker running. But let's include it to remind ourselves what is happening.

  4. Now minikube should start up in the usual way

  5. You can now proceed with the rest of the course.

  6. You will need an additional command to access the application. This is the minor disadvantage! I'll show you this in the lecture called "Important note for Docker Driver Users" when we get there!

Alternative: if you have Docker Desktop, things are even easier...

  1. Go straight to the video called "Installing kubectl and minikube", but you don't need to install minikube!

  2. Instead of installing minikube, you can go to the Docker Dekstop settings, under the "Kubernetes" entry tick "Enable Kubernetes" and then apply and restart.

  3. After a delay, you should now be able to run "kubectl version" and if you have a version number returned for client and server, you're good to go!

Setting up Virtualization Preview 07:16

(Windows 10 Professional Only): Setting up Hyper-V Preview 03:34

Installing kubectl and minikube Preview 11:12

Troubleshooting Minikube Preview 06:42

Docker Overview Preview 02:46

Docker Containers vs Images Preview 13:21

Attention Apple M1 Users! Preview 00:59

Running Containers from DockerHub Preview 12:44

Important note for Docker Desktop and Driver Users Preview 00:43

Services Preview 07:31

NodePort and ClusterIP Preview 12:09

Pod Selection with Labels Preview 15:02

ReplicaSets Preview 10:44

Writing a ReplicaSet Preview 10:05

Applying a ReplicaSet to Kubernetes Preview 10:54

Networking Overview in Kubernetes Preview 08:18

Namespaces - kube-system Preview 09:34

Note for M1 Architectures Preview 00:04

Accessing MySQL from a Pod Preview 07:15

Cygwin extra - fixing the terminal with winpty Preview 04:52

Service Discovery Preview 07:27

Fully Qualified Domain Names (FQDN) Preview 03:27

WARNING - possible resource problems! Preview 00:50

An Introduction to Microservices Preview 15:18

Introduction to Microservices Part 2 Preview 10:40

Fleetman Microservices - setting the scene Preview 13:38

Deploying the Queue Preview 12:38

Deploying the Position Simulator Preview 07:56

Inspecting Pod Logs Preview 05:40

Deploying the Position Tracker Preview 11:07

Deploying the API Gateway Preview 04:49

Deploying the Webapp Preview 06:40

Persistence Preview 12:00

Upgrading to a Mongo Pod Preview 13:48

Mongo Service Preview 06:22

Expanding the Minikube VM Preview 02:50

Volume Mounts Preview 09:26

Volumes Preview 14:25

PersistentVolumeClaims Preview 16:26

StorageClasses and Binding Preview 09:24

Warning Preview 00:34

Getting started with AWS Preview 10:58

Managing a Cluster in the Cloud Preview 09:12

EKS vs Kops - Which to Choose? Preview 09:39

Pricing Differences - EKS vs Kops (prices correct mid 2020) Preview 08:18

Choose Your Own Adventure! Preview 00:24

This Section is for Kops! Preview 00:10

Introducing Kops - Kubernetes Operations Preview 10:15

Installing the Kops Environment - 2021 Update Preview 18:39

Configuring your first cluster Preview 20:04

Running the Cluster Preview 14:03

This section is for EKS Preview 00:07

Getting started with EKS Preview 13:12

Install eksctl and AWS CLI Preview 06:05

Configure the AWS credentials Preview 13:24

Install kubectl Preview 04:28

Start the cluster Preview 04:29

This section is for both EKS and Kops Preview 00:15

Provisioning SSD drives with a StorageClass Preview 12:51

Warning - problems with AWS LoadBalancers Preview 00:46

Note for Kops users Preview 00:44

Deploying the Fleetman Workload to Kubernetes Preview 13:17

Setting up a real Domain Name Preview 04:02

Surviving Node Failure Preview 10:09

Replicating Pods in Kubernetes Preview 11:03

How to delete your EKS cluster Preview 07:06

One last cluster deletion step Preview 01:01

Introducing the ELK / ElasticStack Preview 15:39

Installing the Stack to Kubernetes Preview 16:06

Kibana - first look Preview 09:01

Setting Filters and Refreshes Preview 05:01

Demo: analysing a system failure Preview 05:14

Kibana Dashboards Preview 15:25

Monitoring a Cluster (2020 update) Preview 05:31

Installing the kube-prometheus-stack Preview 15:16

Use the "Classic UI" in the next video Preview 00:07

Using the Prometheus UI Preview 17:19

Introducing Grafana Preview 21:52

(optional) How to Use NodePorts on a Cluster Preview 17:29

Introducing Alerts - 2020 Update Preview 11:46

Preparing a Slack Channel Preview 10:15

Configuring the AlertManager Preview 15:17

Troubleshoot the alertmanager.yaml config Preview 16:40

Dealing with Firing Alerts Preview 16:32

The AlertManager UI and how to Silence Alerts Preview 09:24

How to handle the Watchdog Preview 14:31

Using PagerDuty Preview 17:11

Case Study Preview 00:21

Case Study: Troubleshooting a "Delinquent" node Preview 13:02

What happens if the Master Node crashes? (Kops clusters only!) Preview 10:34

Introduction to the "Advanced Section" Preview 02:40

Code / files for this section Preview 00:06

Enabling the Metrics Server Preview 14:25

Viewing Metrics on the Dashboard Preview 16:42

Tuning Java Spring Boot Applications, Heap restriction Preview 22:52

Setting reasonable Requests Preview 07:42

Update: you will need to modify the yaml file in the next video Preview 00:26

Introducing Replication and Autoscaling Preview 30:59

Testing Autoscaling Preview 07:29

Demo: why readiness probes are needed Preview 12:01

Applying Liveness and Readiness Probes Preview 08:56

Creating a ConfigMap Preview 07:33

Consuming a ConfigMap as Environment Variables Preview 05:29

Do changes to a ConfigMap get propagated? Preview 06:37

How to consume multiple environments variables with envFrom Preview 03:32

Mounting ConfigMaps as Volumes Preview 09:18

Creating Secrets Preview 08:11

Using Secrets Preview 08:06

Where have we already used ConfigMaps and Secrets? Preview 09:39

(extra) Using Spring Cloud Kubernetes to Hot Reload ConfigMaps Preview 00:11

Introducing Ingress Preview 12:07

Defining Routing Rules Preview 15:20

Adding Routes Preview 04:04

Authentication Preview 15:11

Running Ingress on AWS Preview 14:06

Testing the Ingress Rules Preview 08:57

(Extra) setting up HTTPS with TLS termination at the load balancer Preview 00:09

Batch Jobs Preview 22:26

Cron Jobs Preview 09:24

DaemonSets Preview 06:24

StatefulSets Overview Preview 22:21

StatefulSets for Database Replication Preview 09:57

Demo: Scaling out a Mongo Database Preview 21:38

Introducing CI/CD Preview 11:12

Establishing a GitHub organization Preview 10:44

Setting up a Basic Jenkins System Preview 15:07

Defining a Pipeline Preview 18:10

Update - creating a Personal Access Token from Github Preview 01:28

Another minor update! Preview 00:26

Running a Multibranch Pipeline Preview 05:18

Reviewing Builds Preview 10:20

Organization Pipelines Preview 09:32

Continuous Deployment into a Cluster Preview 16:17

Getting Started with Helm Preview 09:21

How do I Install a Helm Chart Preview 14:37

How to Find Helm Charts Preview 10:48

Installing a Monitoring Stack with Helm Preview 14:01

Working with Chart Values Preview 16:14

Customising values.yaml Preview 16:00

Avoiding Snowflake Clusters! Preview 11:56

Using Helm Pull to Take Control of a Chart Preview 16:51

Generating yaml with "Helm Template" Preview 07:24

Why would you write your own Helm Charts? Preview 10:06

Writing Go Templates for Helm Preview 26:52

Helm Functions and Pipelines Preview 14:19

Flow Control in a Helm Template Preview 12:21

Named Templates Preview 21:35

Inspecting a Professional Helm Chart Preview 24:40