Kubernetes Tutorials for Beginners (TechWorld with Nana)

  • Pod: abstraction of containers, usually 1 application per pod, each pod gets its own IP address
  • Service: permanent IP address, attached to each pod, lifecycle of pod and service are not connected, communication
  • Ingress: route traffic into cluster

controlplane:

  • API server: UI/API/CLI, only access to the cluster (cluster gateway, authentication)
  • Controller manager: keeps track of whats happening in the cluster, detects cluster state changes
  • Scheduler: ensures pods placement, decides on which node new pod should be scheduled (kubelet executes the request)
  • etcd: k8s backing store, cluster changes get stored in the key value store

virtual network: creates one unified machine

ConfigMap: external configuration of your app (eg: db urls)

Secret: used to store secret data, base64 encoded

Deployment: a template for creating pods, for stateless app

StatefulSet: for stateful apps or database

Each configuration file has 3 parts:

  1. meta data
  2. specification
  3. status : automatically generated by k8s (etcd holds the current status of any k8s component)

Kubelet: interact with both the container and node

Kube proxy: forwards the requests

worker nodes must install: kubelet, kube proxy, container runtime

production cluster setup: multiple master and worker nodes separate virtual or physical machines

minikube: master (api server) and worker processes (enable pods to run on node, create/destroy pods, services) run on one node, kubectl: cli

service configuration file: selector: select pods to forward the requests to

organise resources in namespaces, virtual cluster inside a cluster

  • kube-system: system processes, master and kubectl processes, do not create or modify
  • kube-public: publicly accessible data
  • kube-node-lease: heartbeats of nodes, each node hasassociated lease object in namespace, determines availability of a node
  • default: resources you create are located here

components: cannot be created within a namesapce (vol, node)