Kubernetes (K8s)
Last updated
Last updated
The task of automating, managing and interacting with a large number of containers is known as orchestration.
At the core of Kubernetes is the Pod.
Pods represent and hold a collection of one or more containers. Generally, if you have multiple containers with a hard dependency on each other, you package the containers inside a single pod.
A service is a grouping of pods that are running on the cluster. Services are "cheap" and you can have many services within the cluster. Kubernetes services can efficiently power a microservice architecture.
Services provide important features that are standardized across the cluster: load-balancing, service discovery between applications, and features to support zero-downtime application deployments.
Each service has a pod label query which defines the pods which will process data for the service. This label query frequently matches pods created by one or more replication controllers. Powerful routing scenarios are possible by updating a service's label query via the Kubernetes API with deployment software.
Terminologies
Pod : one or more containers
ReplicaSet: multiple instances of a pod
Deployment : running code on kubernetes
Service : load-balancing
Namespaces : isolation
YAML : declarative deployments
Helm : package manager for kubernetes
Providers
Microsoft - Azure Kubernetes Service
Microsoft - Azure Service Fabric
Kubernetes Deployment Strategies
Recreate - version A is terminated then version B is rolled out
Ramped - version B is slowly rolled out and replacing version A
Blue/Green - version B is released alongside version A, then the traffic is switched to version B
Canary - version B is released to subset of users, then proceed to a full rollout
A/B Testing - version B is released to subset of users under specific conditions
Shadow - version B receives real world traffic alongside version A and doesn't impact the response performance