Kubernetes (k8s)

  • Kubernetes, also known as K8s, is an open-source system for automating deployment, scaling, and management of containerized applications.
  • origin of name: Greek, meaning: Helmsman or pilot

Container orchestrators

  • Kubernetes
  • Docker Swarm
  • Mesos
    • Big Data
  • Rancher

Kubernetes Cluster

  • Nodes: Master and Worker

Kubernetes Resources

  • Persistent entities in the Kubernetes system that represent state of your cluster
  • The k8s REST API are also designed based on resources
  • They are defined by kind attribute in yaml spec
  • Example Pod spec
apiVersion: v1
kind: Pod # !important
metadata:
  name: webserver-pod
spec: # !important
  ....
  • apiVersion: K8s API version
  • kind: type of k8s resource
    • Pod
    • Deployment
    • Service
    • ConfigMap etc.
  • metadata: to uniquely identify and describe a Kubernetes object
    • labels
    • name
    • namespace
    • annotations
    • finalizers etc.
  • spec: desired state and characteristics of the object that we want to create.

Ways to run Kubernetes

  • minikube
  • Docker for Desktop
  • Kubernetes in Docker (kind) : good for lot of testing
  • Managed Kubernetes service in cloud
    • Amazon Elastic Kubernetes Service (EKS)
    • Azure Kubernetes Service (AKS)

docker: image -> container registry (ACR)
image -> container (running instance of image)