🌱 Tim's Dev Wiki

Search IconIcon to open search

Kubernetes

Last updated September 16, 2022.

Kubernetes is an open-source container orchestrator, ie. a system for automating the deployment and scaling of containers. The rise in popularity of microservice architectures gave rise to the need for container orchestration tools because microservices often need to be containerised. Container orchestrators like Kubernetes are meant to solve challenges arising from scaling containers. Some other technologies similar or related to Kubernetes include OpenShift, Amazon ECS, Rancher, Apache Mesos and more.

Note: Kubernetes and Docker are completely independent technologies. You can use Docker without Kubernetes. Kubernetes, however, needs a container runtime to orchestrate, which may or may not be Docker. It’s just common for Docker and Kubernetes to be used together.

Some background: ‘Kubernetes’ originates from Greek, meaning ‘helmsman’, the person who steers a ship. K8s is an abbreviation for Kubernetes. The ‘8’ is just a count of the letters between k and s.

Kubernetes Features:

# K8s Cluster Architecture

# Nodes, Control Planes

Kubernetes clusters consist of 2 types of resources: nodes and control planes.

  1. Node β€” also called worker nodes. They’re the VMs running the app’s containers. Each node has a Kubelet running inside them.

    • Kubelet β€” a process running inside a node that makes it possible to talk for the node to talk to the control plane. They’re responsible for telling the control plane about the health of the worker node.
  2. Control plane β€” also called the master node. It’s responsible for managing all activities in the cluster like scheduling, scaling, rolling out updates, etc.

    A bunch of critical Kubernetes processes run within the control plane, one of which is an HTTP Kubernetes API server which the nodes use to communicate with the control plane. It’s basically the entrypoint to the K8s cluster and Kubernetes clients talk to this server (eg. through a Kubernetes dashboard, scripts, CLIs, etc.)

# Kubernetes Components

# Service Discovery

TODO.

Every pod gets assigned an internal IP address like 192.*.*.*.

You can group the replicas of a service and put them behind a load balancer, for example, to expose a single cluster IP address that all other services use to talk to it.

There’s even a DNS service that maps symbolic names to those IP addresses.

# Kubectl

TODO.

This is the Kubernetes CLI.

You can

# Under the hood

TODO.