Chapter-3: Prepare Azure Kubernetes Service (AKS) for Microservices
Getting Started with Docker & Kubernetes
Overview
This is our third chapter of the book, In this chapter you will learn basic concepts of Docker like image, container, Dockerfile, docker engine, etc.. then start labs on Prepare an application for AKS, deploying an application in AKS and Working with AKS cluster and more.
Basic Concepts of Docker
-
Docker: is a platform that enables developers to build, package, and deploy applications inside containers.
-
Image: is a read-only template that contains the instructions for creating a Docker container. Docker images can be created using a Dockerfile, Once an image is built, it can be stored in a Docker registry, which is a centralized repository for Docker images.
-
Containers: is a runtime instance of a Docker image. Containers are lightweight, standalone executable packages that contain everything needed to run an application, including code, libraries, dependencies, and configuration files.
-
Dockerfile: A text file that contains the instructions for building a Docker image. A Dockerfile specifies the base image, the software dependencies, and the application code for a Docker container.
-
Docker Engine: The core component of Docker that runs on the host operating system and manages the lifecycle of Docker containers.
-
Registry: A repository for storing and sharing Docker images. Docker Hub is the default public registry for Docker images, but you can also set up your own private registry.
-
Docker Compose: allows you to define and run multi-container Docker applications. It uses a YAML file to define the services, networks, and volumes needed for the application to run. With Docker Compose, you can start, stop, and manage multiple containers with a single command.
With Docker, developers can create and test applications in a local environment, then package them into containers that can be easily deployed to production servers or cloud-based environments.
Docker and Kubernetes Relationship
Docker and Kubernetes are two distinct technologies that are often used together to deploy and manage containerized applications.
Docker
is a containerization technology that allows developers to package their applications and dependencies into portable and self-contained containers. These containers can be run consistently across different environments, which makes it easier to develop, test, and deploy applications.
Kubernetes
on the other hand, is a container orchestration platform that automates the deployment, scaling, and management of containerized applications. Kubernetes provides a framework for managing multiple Docker containers across a cluster of servers, with features such as load balancing, auto-scaling, and self-healing.
In other words, Docker provides a way to package and distribute applications as containers, while Kubernetes provides a way to manage and orchestrate those containers in a scalable and efficient manner.