Kubernetes Overview

What is Kubernetes?

Kubernetes is a Container Orchestration System.

Need for a Container Orchestration System

Developers began to realize the scalability and maintainability issue they faced with monolithic applications. Thereby, developers started to divide huge software into smaller maintainable units known as microservices.

Even though Docker provides a way to run and network these services, it became difficult to maintain these services when they grow out of developers hands. So, Container Orchestration System came into the picture to allow easy management of microservices.

Kubernetes - Architecture

A Kubernetes cluster consists of the following things.

  • A Master Node is responsible for managing the cluster.
  • A Worker Node on which pods run.
  • An etcd store that stores cluster state in the form of key-value pairs.

Kubernetes - Objects

  • Pod is the smallest unit of deployment in Kubernetes. Pods typically run single containers in them, but sometimes for the containers tightly coupled, a pod can also run multiple containers. Pods run on Nodes (A Physical or a Virtual Machine).
  • Service allows you to group pods logically and enforce access policies on them. Services allow you to expose the deployment to the outside world.
  • Labels are the key-value pair to organize and select objects.
  • Selectors allow you to select Labels.
  • Names are the user provided names for Kubernetes objects in Resource URL.
  • UID is a system generated Unique Identifier to identify an object uniquely.
  • Namespaces are used to keep some pods isolated from the rest. They are virtual clusters.
  • Volumes are persistent data storage units of Kubernetes.

Kubernetes - Tools

  • minikube is a tool used to create Kubernetes cluster on a local machine for development.
  • kubectl is a tool used to communicate with Kubernetes master to manage the cluster.
  • yaml files are used to describe Kubernetes objects or desired cluster state.