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
kindattribute in yaml spec - Example
Podspec
apiVersion: v1
kind: Pod # !important
metadata:
name: webserver-pod
spec: # !important
....apiVersion: K8s API versionkind: type of k8s resourcePodDeploymentServiceConfigMapetc.
metadata: to uniquely identify and describe a Kubernetes objectlabelsnamenamespaceannotationsfinalizersetc.
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)