Section 3: Containerized Applications with Docker and Kubernetes
Chapter 07: Containerizing Your Application with Docker
Managing Containers Effectively with Kubernetes
Chapter 7: Containerizing Your Application with Docker 215
Technical requirements 216
Table of Contents
[ v ]
Installing Docker 216
Registering on Docker Hub 217
Docker installation 218
An overview of Docker's elements 223
Creating a Dockerfile 223
Writing a Dockerfile 224
Dockerfile instructions overview 225
Building and running a container on a local machine 226
Building a Docker image 226
Instantiating a new container of an image 228
Testing a container locally 229
Pushing an image to Docker Hub 229
Deploying a container to ACI with a CI/CD pipeline 233
The Terraform code for ACI 234
Creating a CI/CD pipeline for the container 235
Summary 244
Questions 244
Further reading 245
Chapter 8: Managing Containers Effectively with Kubernetes 246
Technical requirements 247
Installing Kubernetes 247
Kubernetes architecture overview 248
Installing Kubernetes on a local machine 249
Installing the Kubernetes dashboard 250
First example of Kubernetes application deployment 254
Using HELM as a package manager 258
Using AKS 262
Creating an AKS service 263
Configuring kubectl for AKS 264
Advantages of AKS 265
Creating a CI/CD pipeline for Kubernetes with Azure Pipelines 266
The build and push of the image in the Docker Hub 267
Automatic deployment of the application in Kubernetes 273
Summary 276
Questions 276
Further reading 277
|