What's the difference between pods, containers, deployments, and services, in Kubernetes?

A quick recap of kubernetes terms.

What's the difference between pods, containers, deployments, and services, in Kubernetes?
Photo by Growtika / Unsplash
  • Pods are the smallest unit of compute in Kubernetes.
  • Kubernetes pods group similar containers into a logical unit.
  • Containers inside of Kubernetes pods have the same IP address and move "together" from host to host.
  • Pods get scheduled on to kubelets (nodes).
  • While you can create pods directly, you won't want to do this most of the time. Instead, you'll want to create them through resources called deployments.
  • Kubernetes deployments provide a desired state for pods in an application.
  • Pods within deployments otherwise are discovered inside of Kubernetes networks through the resources called services.
  • Services provide a single IP address and a DNS record for a group of related pods.
  • Like pods, IP addresses for services can be reached by any container in a Kubernetes cluster. Services give developers more control over when and how those IP addresses become available.