Kubernetes:
- Kubernetes word derived from Greek word meaning Helmsman – person who steers a ship.
- Open-sourced handed over to the Cloud Native Computing Foundation (CNCF), written in Go (Golang)
- Kubernetes is an orchestration, orchestration of containerized apps., often written as k8s
- It is leading container orchestrator lets us manage containerized apps and or micro service apps.
- Micro service apps made of lots of small and independents parts.
- You say hey Kubernetes, here is my app, consist of these parts, just run it for me, and Kubernetes run it.
- You package the app as containers, give them declarative manifest, and let Kubernetes runt it.
- It is platform agnostic, runs on bare metal, VMs, cloud instances (private and public), OpenStack, anything with Linux.
- Does scaling, self-healing, load balancing, rolling updates and more.
- Lives on Github at kubernetes/kubernetes, Twitter - @kubernetesio
How Kubernetes relate
to Docker:
- Docker is a low level technology, orchestrated and managed by Kubernetes.
- Kubernetes has also released Container Runtime Interface – (CRI)
Explore Kubernetes Master and workers
Kubernetes and Borg:
- Google use frameworks – Borg and Omega (Google in house technology), to check billions of container in check. That is why some people think Kubernetes is an open-sourced version of either Borg or Omega, but it is not.
Kubernetes components:
- Kubernetes made of one more masters (also refereed as control plane) and bunch of nodes. Explore at - https://shrenikp.blogspot.com/2020/03/kubernetes-masters-control-plane.html
- Application service runs on nodes.
- Deployment means package application and deploy it on Kubernetes.
- Deployments defined via YAML or JSON manifest file – contains what images to use, ports to expose, network to join, how to perform update, how many replicas etc. we give file to Kubernetes master, which deploy it on cluster, constantly monitor it, and make sure it is running exactly as requested. If something is not as we ask, it tries to fix it. Deployments build on top of Replicaset, add update model, make versioned rollback.It is first-class REST objects in Kubernetes API.
- Pods - Minimum unit of scaling in Kubernetes, mortal, born, live and die. In VM World atomic unit of deployment is virtual machine, in Docker world, its container, in Kubernetes it's POD. Containers always runs inside Pods. If POD die, Kubernetes start another one, smell, feel exactly like one that died, with new ID and new IP address, in cluster
You can run multiple container inside single POD, they share the same environment such as IPC namespace, shared memory, volumes, network stack etc., same IP address. Multiple container in the same POD can communicate using localhost, good for tightly coupled container requirement. To scale application you do add POD and not container. PODS are deployed via ReplicaSets. ReplicaSets is a higher-lever Kubernetes object that wraps around a Pod and adds features, such as self healing, and scaling. - Services - Services are fully-fledged objects like, PODS, Replicaset, and Deployments. Services provide stable IP addresses, DNS, support TCP (default) and UDP, load balancing across PODS, stable networking endpoint. Sends traffic to healthy Pods.
- Labels - Services knows which Pods to load-balance across is via labels. Pods are loosely associated with Service, as they share same lables as the Service.
- ConfigMap:
- An API object stores non-confidential data in key-value pairs.
- Pods can use ConfigMaps as environment variables, command-line arguments, or as configuration files in a volume.
- It allows you to decouple environment-specific configuration from container images, so applications are easily portable.
- It is not designed to hold large chunks of data.
- Limit to store data for ConfigMap is 1 MiB. Mounting a volume or use separate database or file service to store more data.
Comments
Post a Comment