This tutorial is adapted from Web Age course Docker and Kubernetes Administration.
1.1 Architecture Diagram
In this tutorial, we will review various parts of the following architecture diagram:
Cluster – Includes one or more master and worker nodes
Master – Manages nodes and pods
(worker) Node – a physical, virtual or cloud machine
Pod – A group of one or more containers, created and managed by Kubernetes
Container – Are most commonly Docker containers where application processes are run
Volume – A directory of data accessible to containers in a pod. It shares a lifetime with the pod it works with.
Namespace – A virtual cluster. Allows for multiple virtual clusters within a physical one.
1.3 Kubernetes Cluster
A Kubernetes cluster is a set of machines(nodes) used to run containerized applications. To do work a cluster needs to have at least one master node and one worker node. The Master node determines where and what is run on the cluster. Worker nodes contain pods that contain containers. Containers hold execution environments where work can be done. A cluster is configured via the kubectl command-line interface or by the Kubernetes API.
1.4 Master Node
The Master node manages worker nodes.
The master node includes several components:
Kube-APIServer – traffic enters the cluster here
Kube-Controller-Manager – runs the cluster’s controllers
Etcd – Maintains cluster state, provides key-value persistence
Kube Scheduler – schedules activities to worker nodes
Clusters can have more than one master node
Clusters can have only one active master node
The Kube-Control-Manager (part of the Master Node) manages the following controllers:
Service account controller
All these controller operations are compiled into a single application. The controllers are responsible for the configuration and health of the cluster’s components.
A node consists of a physical, virtual, or cloud machine where Kubernetes can run Pods that house containers. Clusters have one or more nodes. Nodes can be configured manually through kubectl. Nodes can also self-configure by sending their information to the Master when they start up. Information about running nodes can be viewed with kubectl.
Other components found on the worker node include:
kubelet – interacts with the master node, manages containers and pods on the node
kube-proxy – responsible for network configuration
container runtime – responsible for running containers in the pods (typically Docker)
1.7 Other Components
Pods – Logical container for runtime containers
Containers – Pods typically contain Docker runtime containers holding OS images and applications. Work is run in containers.
1.8 Interacting with Kubernetes
In this tutorial, we covered:
Interaction through API