Kubernetes for Beginners - Intro to advanced - Day 1

preview_player
Показать описание
Section

Intro
Prerequisites ?
Yes, docker and docker-compose. Docker knowledge is a must; but docker-compose can really help.

What is Kubernetes / K8S ?
is a container orchestration tool.
Tools to manage, scale, and maintain containerized applications are called orchestrators.
How is it different from docker & docker-compose ?
Simple, docker-compose/docker is aimed for host deployment. Whereas, K8S is meant for multi-node; real world deployment.
K8S is a internally having master and worker nodes; Supports RBAC, DRA, HA, replicas, Load balancing.
Scaled Production settings vs Internal deployment.

K8S architecture ?
All you need to know now is:
There is K8S server and K8S client.
K8S server spins up docker instances on demand and maintains state of all worker nodes. Ensures everything is working as expected.)
K8S client is also called kubectl. Kubectl client allows us to interact with the K8S server/Cluster.
Thatʼs it.

There are many implementations of K8S  The full blown K8S service: EKS, GKE, Azure Kube Services, K3S, K3D, RKE2, Kind, Minikube.
Docker
K3D K3S on docker The server piece
Kubectl The client piece
Section 3Pods What are Pods ?
Pods Containers
But Pods can contain multiple containers. Generally, the additional sidecar/init container are used for logging and initialization. Eg: Fluentbit container with Service container for logging.
Conceptually, it is same and serves the same function.
How to create one Pod ?
Section 4 kubectl get , delete, describe, logs, exec Resources
Pod: The smallest unit of deployment. It contains one or more containers.
Deployment: A declarative way to manage a set of Pods. It ensures that a desired number of Pods are running.
ReplicaSet: An older way to manage a set of Pods, typically used for stateful applications.
Service: Abstracts a group of Pods and provides a stable network endpoint.
Ingress: A reverse proxy that routes traffic to different services based on URL paths or other criteria.
Additional resources
ConfigMap: Stores configuration data as key-value pairs. Secret: Stores sensitive data, such as passwords or API keys.
PersistentVolume: A persistent storage resource that can be bound to multiple Pods.
PersistentVolumeClaim: A request for a PersistentVolume by a Pod.
Job: A one-time task that is executed to completion. CronJob: A scheduled job that runs periodically.
StatefulSet: Manages a set of Pods with a stable identity and persistent storage.
DaemonSet: Ensures that a Pod runs on every node in the cluster.

kubectl get [resource]
kubectl delete [resource] [resourcename] kubectl describe [resource] [resourcename] kubectl logs [resourcename]
kubectl exec [resourcename]
Рекомендации по теме