Kubernetes is a rapidly evolving platform that manages container-based applications and their associated networking and storage components. Kubernetes focuses on the application workloads, not the underlying infrastructure components. Kubernetes provides a declarative approach to deployments, backed by a robust set of APIs for management operations.

Core Kubernetes infrastructure components: control plane nodes node pools Workload resources: pods deployments sets How to group resources into namespaces.

Kubernetes cluster architecture

A Kubernetes cluster is divided into two components:

  1. Control plane: provides the core Kubernetes services and orchestration of application workloads.
  2. Nodes: run your application workloads.

control-plane-and-nodes.png

Nodes and node pools To run your applications and supporting services, you need a Kubernetes node. An AKS cluster has at least one node, an Azure virtual machine (VM) that runs the Kubernetes node components and container runtime.

Component Description

kubelet The Kubernetes agent that processes the orchestration requests from the control plane along with scheduling and running the requested containers.

kube-proxy Handles virtual networking on each node. The proxy routes network traffic and manages IP addressing for services and pods.

container runtime Allows containerized applications to run and interact with additional resources, such as the virtual network and storage. AKS clusters using Kubernetes version 1.19+ for Linux node pools use containerd as their container runtime. Beginning in Kubernetes version 1.20 for Windows node pools, containerd can be used in preview for the container runtime, but Docker is still the default container runtime. AKS clusters using prior versions of Kubernetes for node pools use Docker as their container runtime.

aks-node-resource-interactions.png

**Kubernetes commands **

  1. kubectl apply -f

Deploy apps effortlessly. Apply a YAML file to deploy a web application.

  1. kubectl get pods

Peek into your cluster's soul. List all running pods in your namespace.

  1. kubectl scale deployment

Effortlessly scale your apps. Increase replicas of a service for high traffic.

  1. kubectl describe

Explore resource details. Get detailed info about a specific pod.

  1. kubectl logs

Uncover your pod's stories. View application logs for debugging.

  1. kubectl exec

Take control inside containers. Execute a shell inside a container for debugging.

  1. kubectl rollout

Manage deployments like a pro. Roll back to a previous version of an app.

  1. kubectl delete

Clean up your Kubernetes playground. Delete a resource like a pod or service.

  1. kubectl config

Master multi-cluster management. Switch between different Kubernetes clusters.

  1. kubectl proxy Create secure tunnels to services. Access a service in your cluster securely.

  2. kubectl top Keep an eye on resource utilization. Monitor CPU and memory usage of pods