Course contentsShow
← AI Engineering
Lesson 1102 of 1,88627. Cloud Deployment and ScalingFree lesson

Kubernetes Core Concepts: Pods, Deployments, Services

Learning the essential Kubernetes objects needed to run containerized AI applications.

Kubernetes Core Concepts: Pods, Deployments, Services

What you'll learn: The three essential Kubernetes building blocks you need to run and expose AI applications in production.

The Core Trio

Think of Kubernetes like a restaurant kitchen. Pods are individual cooking stations, Deployments are the head chef's recipe and staffing plan, and Services are the waiters connecting customers to the kitchen.

Pods: The Smallest Unit

A Pod is the smallest deployable unit in Kubernetes—typically one or more containers running together. For AI workloads, a Pod might contain your model serving container (like vLLM or TorchServe) plus a sidecar for logging.

Pods are ephemeral. They can restart, move between nodes, or be replaced. Never rely on a specific Pod being available.

Deployments: Desired State Management

A Deployment declares what you want running: "I want 3 replicas of my inference server, using this container image, with 8GB memory each." Kubernetes continuously ensures reality matches your declaration.

If a Pod crashes, the Deployment automatically creates a replacement. Want to scale? Change the replica count. Need to update your model? Update the container image—Kubernetes handles the rollout.

Services: Stable Network Access

Pods have dynamic IPs that change when they restart. A Service provides a stable DNS name and IP address that routes traffic to healthy Pods behind it.

For AI applications, you'll typically use a ClusterIP service (internal access only) or a LoadBalancer service (external access). Services handle load balancing across your Pod replicas automatically.

How They Work Together

Your Deployment creates Pods running your AI model. Your Service discovers those Pods and routes inference requests to them. Clients call the Service's stable endpoint, never worrying about which Pod handles each request.

Key Takeaway: Pods run your containers, Deployments manage Pod lifecycles and scaling, and Services provide stable networking—master these three, and you can deploy any AI workload on Kubernetes.