Sobes.tech
Middle

What kinds of Kubernetes entities do you know and what are their differences?

sobes.tech AI

Answer from AI

In Kubernetes, there are many entities (kinds), each responsible for a specific aspect of container and infrastructure management. The main ones are:

  • Pod — the smallest deployable unit, containing one or more containers that share network and storage.
  • Deployment — manages the creation and updating of ReplicaSets, providing declarative updates for Pods.
  • ReplicaSet — ensures that a specified number of Pods are running in the cluster.
  • StatefulSet — manages the state and ordering of Pods with unique identifiers, useful for databases.
  • DaemonSet — ensures a copy of a Pod runs on each (or selected) node in the cluster.
  • Service — an abstraction for accessing Pods, providing a stable IP and load balancing.
  • ConfigMap and Secret — for storing configuration data and secrets respectively.
  • Job and CronJob — for one-time and periodic tasks.

The differences between them lie in the tasks they solve: some manage the lifecycle of applications (Deployment, StatefulSet), others provide network access (Service), some handle configuration and secrets (ConfigMap, Secret), and others are for tasks and automation (Job, CronJob).