Part2 :- Kubernetes Workload Objects
Madhuri Sharma
DevOps Lead @Telus Digital || 10K @LinkedIn || AWS || K8s || CICD || Terraform || DevOps || Service Mesh-Istio || Prometheus && Grafanna
In this post we will take a look at Workload Objects.
In Part 1?: We learnt What Kubernetes is and its physical infrastructure which a cluster of Control plane nodes and worker nodes
In Part 2: We will look at Workload objects and how it helps deploy and manage apps.
So at the highest level Kubernetes is an orchestrator of microservice apps.
Kubernetes provides several workload objects to define how applications run in a cluster. Each serves a specific purpose, ranging from stateless microservices to stateful databases and scheduled tasks.
Let’s go over each workload object in a greater detail.
1. Pod????
A Pod is the smallest and simplest deployable unit in Kubernetes. It represents a single instance of a running process in the cluster.
Key Features:
Use Cases:
? Running a single application container (e.g., a simple web server). ? Running multiple containers that need to share resources (e.g., a web server and a sidecar for logging).
2. Deployment ??
A Deployment is a higher-level controller that manages the lifecycle of stateless applications by handling scaling, rolling updates, and rollbacks.
Key Features:
Use Cases:
? Running stateless applications (e.g., REST APIs, web services). ? Continuous deployment and rolling updates without downtime.
3. ReplicaSet ??
A ReplicaSet ensures that a specified number of identical pod replicas are running at all times.
Key Features:
Use Cases:
? Ensuring a fixed number of pod replicas are always running. ? Used in Deployments to manage pod scaling.
领英推荐
4. StatefulSet ??
A StatefulSet is used for applications that require persistent storage, unique network identities, and ordered deployments.
Key Features:
Use Cases:
? Running databases (e.g., MySQL, PostgreSQL, MongoDB).
5. DaemonSet ???
A DaemonSet ensures that a specific pod runs on every node in the cluster.
Key Features:
Use Cases:
? Running node-level monitoring agents (e.g., Prometheus Node Exporter). ? Running logging daemons (e.g., Fluentd, Filebeat). ? Running network services (e.g., CNI plugins).
6. Job??
A Job is used for running one-time or short-lived batch tasks in Kubernetes.
Key Features:
Use Cases:
? Data processing tasks (e.g., ETL jobs). ? Running a script once (e.g., database schema migrations).
7. CronJob??
A CronJob runs jobs at scheduled intervals, similar to a Linux cron job.
Key Features:
Use Cases:
? Scheduled database backups. ? Sending periodic emails. ? Cleanup tasks (e.g., deleting old logs).
In conclusion, Workload objects allow you to deploy and manage apps. Depending on the use case and workloads you pick and choose various workloads objects.
Stay tuned in the next article we will go over Services in Kubernetes, What Services is, its types and use cases.
DevOps Lead @Telus Digital || 10K @LinkedIn || AWS || K8s || CICD || Terraform || DevOps || Service Mesh-Istio || Prometheus && Grafanna
3 周Thanks Ajay Pandey Sir
Solution Architect @Telus Digital-|AWS| System Design| Solution Architecture |DevOps & Cloud | Kubernetes| CI/CD| Terraform| GCP| HA| Scalability| Reliability| Security | Cost Optimization | Disaster Recovery
3 周Great Stuff Madhuri Sharma. Liked the diagram. One thing to call out Kubernetes is all about running and orchestrating containers and those containers run inside a Pod so you cannot deploy containers directly on kubernetes. It has to be wrapped inside a Pod becoz Pod is the smallest unit of deployment and scaling in K8s. Excited about how you unfold Services in Part 3. Keep going ! TELUS Digital