Kubernetes
Getting started with
Table of contents
01
02
03
What is kubernetes
Main Components & their Role
Kubernetes Resources
What is Kubernetes?
01
Kubernetes is an application orchestrator
An orchestrator is a system that deploys and manages applications. It can deploy your applications and dynamically respond to changes.
For example, Kubernetes can:
• Deploy your application
• Scale it up and down dynamically based on demand
• Self-heal it when things break
• Perform zero-downtime rolling updates and rollbacks
• Lots more…
What’s with the Name?
The name Kubernetes (koo-ber-net-eez) comes from the Greek word meaning Helmsman – the person who steers a seafaring ship. This theme is reflected in the logo, which is the wheel (helm control) of a ship. It shortened to “K8s” (pronounced “kates”).
Kubernetes & Docker
Docker is the low-level technology that starts and stops the containerised applications. Kubernetes is the higher-level technology that looks after the bigger picture, such as deciding which nodes to run containers on, deciding when to scale up or down, and executing updates. K8s has a CRI which can support not just Docker but other container runtimes as well.
Main Components & their Role
02
Control Plane
Kubernetes control plane node is a server running collection of system services that make up the control plane of the cluster. Sometimes we call them Masters, Heads or Head nodes.
Controller & Controller Manager
Kubernetes uses controllers to implement a lot of the cluster intelligence. They all run on the control plane. Controllers ensure the cluster runs what you asked it to run.
The cloud controller manager
If your cluster is on a public cloud, such as AWS, Azure, GCP, or Civo Cloud, it will run a cloud controller manager that integrates the cluster with cloud services, such as instances, load balancers, and storage. For example, if you’re on a cloud and an application requests a load balancer, the cloud controller manager provisions one of the cloud’s load balancers and connects it to your app.
Scheduler
The scheduler watches the API server for new work tasks and assigns them to healthy worker nodes. It implements the following process: watch the API server for new tasks, identify capable nodes,and assign tasks to nodes
API Server
The API server is the Grand Central of Kubernetes. All communication, between all components, must go through the API server. Internal system components, as well as external user components, all communicate via the API server – all roads lead to the API Server.
The cluster store
The cluster store is the only stateful part of the control plane and persistently stores the entire configuration and state of the cluster. As such, it’s a vital component of every Kubernetes cluster – no cluster store, no cluster.
Kubelet
The kubelet is the main Kubernetes agent and handles all communication with the cluster. It is part of each worker node. If a task won’t run, the kubelet reports the problem to the API server and lets the control plane decide what actions to take.
Runtime
Every worker node has one or more runtimes for executing tasks. Most new Kubernetes clusters pre-install the containerd runtime and use it to execute
tasks.
Kubeproxy
Every worker node runs a kube-proxy service that implements cluster networking and load balances traffic to tasks running on the node. It monitors the changes that happen to Service objects and their endpoints. If changes occur, it translates them into actual network rules inside the node.
Kubernetes Resources
03
Pods
Pods are the smallest deployable units of computing that you can create and manage in Kubernetes. Kubernetes runs containers but they all need to be wrapped in Pods.
More on Pods…
Pod Create Flow
Deployments
Kubernetes works with Pods, you’ll almost always deploy them via higher- level controllers such as Deployments.
Deployments add self-healing, scaling, rolling updates, and versioned rollbacks to stateless apps.
Services
A pod has a lifecycle they are created and eventually they are destroyed. This makes communication to pods unreliable because their IP addresses keep changing. �Services come into play by providing reliable networking for groups of Pods.
Ingress
Ingress is an kubernetes resource that defines the routing rules.Kubernetes doesn’t have a built-in Ingress controller, meaning you need to install one. This differs from Deployments, ReplicaSets, Services, and most other resources that have built-in pre-configured controllers.
Ingress controller makes one Kubernetes service using that get exposed as LoadBalancer.
Thanks!