Course Overview

Docker has emerged as one of the most popular software platforms for managing applications. It enables applications to be developed, shipped and run in a standardized, lightweight and portable fashion through the use of containers. Kubernetes has become the de facto standard for managing containerized applications by automating the processes for deploying, scaling and managing containers.

This course provides an introduction to the fundamentals of Docker and Kubernetes for developers and administrators.

Key Learning Areas

  • Understand the features, design goals and architecture of Docker
  • Install the tools necessary to work with Docker
  • Use the Docker command line interface (CLI)
  • Browse, create, build and run images
  • Use data storage techniques for file sharing
  • Use networking techniques for container communication
  • Understand the features, design goals and architecture of Kubernetes
  • Install the tools necessary to work with Kubernetes
  • Create and manage resources using Kubernetes commands
  • Specify and create resources using yaml files
  • Deploy applications to Kubernetes
  • Scale, update and rollback Kubernetes deployments
  • Store data using Kubernetes volumes
  • Create services to communicate with Kubernetes applications
  • Install and manage Kubernetes applications using Helm
  • Create a CI/CD solution using Jenkins with Kubernetes

Course Outline

Introduction to Docker
The course begins with a general introduction to the motivation and architecture of containers and Docker. This module thoroughly covers the details of how to install Docker and the tools that facilitate its use.

  • What is Docker?
  • Containers
    • Introduction
    • Benefits
  • Docker Architecture
    • Client (docker.exe)
    • Daemon
    • Client-daemon communication
    • Image
    • Registry
    • Engine
  • Installation
    • Creating and connecting to an Ubuntu Virtual machine
    • Testing and updating the installation
    • Configuring Visual Studio Code for Docker

Containers and Images
Containers are built from images and represent the fundamental building blocks of Docker. This module discusses how to create, build, run and remove containers and images, and provides in-depth coverage of the relationship between them.

  • Containers
    • Introduction
    • List
    • Start/stop/pause/unpause
    • Remove
  • Images
    • Docker Hub
    • Dockerfile
    • Create and run
    • Remove

Docker Storage and Networking
Docker provides a number of options for storing data and for networking. This module discusses the techniques for sharing files between containers using volumes, sharing files with the host using bind mounts, and storing files in the host’s memory using tmpfs mounts. It also presents the available Docker networking drivers, with an emphasis on bridge networks, which connect containers running on the same host, and host networks, which enable binding the container directly to the host network.

  • Volume mounts
  • Bind mounts
  • tmpfs mounts
  • Bridge networks
    • Default
    • User-defined
  • Host networks

Introduction to Kubernetes
For production scenarios, it is not enough to merely containerize an application. The containers need to be managed to provide features such as load balancing, scaling, service discovery, automated rollout and rollback of deployments, matching containers to node resources, and automatically replacing failed or unhealthy containers. This module introduces Kubernetes, which has become the standard platform for managing containers and providing the features required for real-world application deployment.

  • What is Kubernetes?
  • Architecture Overview
    • Cluster
    • Nodes
    • Pods
    • Control plane
  • Tools, Installation, and Basic Commands
    • Minikube
    • Kubectl
  • Creating a simple “Hello World” deployment

Kubernetes Deployment
This module begins with detailed coverage of the architectural details of Kubernetes that are necessary for developing a thorough understand of Kubernetes deployments. It then demonstrates how to create a deployment from both the command line and using a yaml file. The module concludes with a discussion of how to update, rollback, scale, pause and resume a deployment.

  • Architecture details
    • Pods
    • Nodes
    • Objects/Resources
    • Workloads
    • ReplicaSets
  • Deployment
    • Create from the command line
    • Create from a yaml file
    • Update
    • Rollback
    • Scaling
    • Pause/resume

Kubernetes Storage
Kubernetes has a wide range of different volume types for providing persistent and temporary storage. This module surveys the major volume types, with a detailed discussion of local and host path volumes. The module concludes by showing how to use persistent volumes by defining a Persistent Volume (PV), a Persistent Volume Claim (PVC), and a Pod that uses the PVC to request storage, and how to delete PVs and PVCs.

  • Persistent volumes
    • Persistent volume (PV)
    • Persistent volume claim (PVC)
    • Pods
    • Binding
  • Volume types
    • Local
    • Host path
  • Deleting PVs and PVCs

Kubernetes Networking
Applications deployed into Kubernetes typically need to access other applications and be accessible to them. This module presents the facilities provided by Kubernetes for communicating with a pod directly and by using a service. The details of services are presented in detail, with a discussion of the different service types, how to create services implicitly from the command line and explicitly from a yaml file, and how to access a service from within a cluster, from outside of a cluster, and from a remote machine.

  • Networking model
  • Services
    • Selectors and labels
    • Endpoints
    • Types
      • ClusterIP
      • NodePort
      • LoadBalancer
      • External name
    • Creation
      • CLI
      • Yaml
    • Exposing
      • Within the cluster
      • Externally
      • Local port forwarding

Helm
A common requirement for Kubernetes applications is to package and share the software after it has been deployed and tested. This module presents Helm, a package manager that streamlines the process of finding, installing and managing Kubernetes applications. Helm provides facilities for finding and creating a chart, which is a package that is used for creating an instance of a Kubernetes application. This module discusses the motivation for Helm, how to install it, how it is architected, how to search for charts using the provided hub, how to add/install charts, and how to manage releases.

  • What is Helm?
  • Installation
  • Architecture
  • Charts
    • Search
      • Hub
      • Repositories
    • Add/install
      • Set default values
    • Releases
      • Create
      • Upgrade
      • Rollback
      • Uninstall

Jenkins
Modern software development best practices mandate the use of a Continuous Integration/Continuous Deployment (CI/CD) solution. Jenkins has emerged as the leading open source automation server, with a wealth of plugins that provide the requisite support for the critical parts of the software development process. This module shows how Kubernetes can be used to effectively manage Jenkins resources to create an optimized automation server installation. It demonstrates how to configure Kubernetes storage for Jenkins, how to install Jenkins with Helm, and how to use Jenkins to create a new job. It presents an example of how to configure a build trigger to perform an action when a github repo is updated and how to view the Jenkins build history to verify that the appropriate action was executed. 

  • What is Jenkins?
  • Jenkins on Kubernetes
  • Installing Jenkins
  • Configuration
    • Creating a local volume for Jenkins storage
    • Creating a service account
    • Enabling persistence
    • Installing Jenkins with Helm
    • Installing Jenkins with yaml files
  • Jenkins
    • Creating a new job
    • Configuring a build trigger
    • Viewing the build history

Day 4 (optional)
Kubernetes Storage and Networking Part 2
Production scenarios require storing configuration data, which may include sensitive information. They also require managing access to the services in a Kubernetes cluster. This module covers these additional storage and networking topics that are important for the deployment of a real-world Kubernetes app.

  • Configuration
    • ConfigMaps
    • Secrets
  • Ingress and Ingress Controllers

Azure Kubenetes Services (AKS)
Deploying a Kubernetes cluster to the cloud significantly simplifies the required management and administration tasks. It also provides features related to access, security, health monitoring and Continuous Integration/Continuous Deployment (CI/CD). This module shows how to create an AKS cluster and how to use it for deploying, running, scaling and updating an application. It also discusses how to use the Azure Container Registry (ACR), Azure’s private container registry.

  • What is AKS?
  • Create an AKS Cluster
  • Use the Azure Container Registry (ACR)
  • Manage an application in AKS
    • Install using Helm
    • Run
    • Scale
    • Update

CI/CD
Modern software development best practices mandate the use of a CI/CD solution. Azure DevOps provides the requisite support for the critical parts of the software development process, from planning to building to deploying applications. This module shows how to use Azure DevOps in conjunction with AKS. Specifically, it discusses how to create a CI/CD pipeline that pushes an updated image to the ACR every time a GIT code repo is modified and that deploys the changes to AKS.

  • Create an Azure pipeline
  • Integrate the ACR with an Azure pipeline
    • Build/Push a Docker image
  • Integrate AKS with an Azure pipeline
    • Deploy an application

Who Benefits

Developers and administrators who would like to leverage the advantages of containers by learning the fundamentals of Docker and Kubernetes

Prerequisites

Familiarity with basic Linux commands