0Pricing
MLOps Academy · Lesson

Pods, Deployments, and Services for Models

Map ML serving onto core Kubernetes objects.

Pods, Deployments, and Services for Models is a free MLOps Academy lesson on CoddyKit — lesson 1 of 4. You can read the complete lesson below for free — then practise it hands-on in the browser with a built-in code editor and a 24/7 AI tutor. It is part of the MLOps Academy learning path, one of 4 lessons in the course, and your progress syncs across the web and the CoddyKit app.

The Pod Is the Smallest Unit

Kubernetes never runs a bare container. The smallest thing it schedules is a Pod, a wrapper holding one container (your model server) plus its shared network. 📦

One Model Server per Pod

For ML serving you usually put one model API container in each Pod. That keeps scaling, restarts, and resource limits simple to reason about per model.

Pods Are Disposable

A Pod can die at any moment, on a node failure or an upgrade. You never name or nurse one; you let the cluster replace it for you.

Deployments Keep Pods Alive

A Deployment is the controller you actually create. It says how many identical model Pods you want and rebuilds any that crash or vanish.

apiVersion: apps/v1
kind: Deployment
metadata:
  name: model-api
spec:
  replicas: 3

Replicas Give You Scale

Set replicas to 3 and you instantly run three copies of your model server. Bump the number and Kubernetes spins up more to share the load.

The Pod Template

Inside a Deployment, the template is the blueprint for every Pod: which image to pull, what port the model API listens on, and its resource needs.

Rolling Updates Are Built In

Ship a new model image and the Deployment does a rolling update, replacing old Pods a few at a time so predictions keep flowing with no downtime.

Pod IPs Keep Changing

Every new Pod gets a fresh internal IP. Clients cannot chase moving targets, so you need a stable front door that does not change. 🔀

The Service Is That Front Door

A Service gives your model Pods one steady name and virtual IP, then load-balances requests across whichever replicas are currently healthy.

apiVersion: v1
kind: Service
metadata:
  name: model-api
spec:
  selector:
    app: model-api
  ports:
    - port: 80

Labels Wire It Together

A Service finds its Pods by matching labels, not IPs. The selector app=model-api links the Service to every Pod carrying that same label.

ClusterIP vs LoadBalancer

A ClusterIP Service is reachable only inside the cluster, fine for internal calls. Use LoadBalancer or an Ingress when external users need the model.

Quick Check

Which object should you create to run and self-heal model Pods?

Recap

Pods run your model, a Deployment keeps the right number alive, and a Service gives clients one stable address. That trio is the core of serving on Kubernetes. ✅

Frequently asked questions

Is the “Pods, Deployments, and Services for Models” lesson free?

Yes — the full text of “Pods, Deployments, and Services for Models” is free to read here on the web, and the MLOps Academy course includes 4 lessons in total. To practise it interactively (a built-in code editor and a 24/7 AI tutor) and unlock the rest of the MLOps Academy course, upgrade to CoddyKit PRO.

What will I learn in “Pods, Deployments, and Services for Models”?

Map ML serving onto core Kubernetes objects. You practise MLOps Academy with hands-on code you run directly in the browser, and a 24/7 AI tutor answers your questions as you work through the lesson.

Do I need any experience to start MLOps Academy?

No prior experience is required. MLOps Academy on CoddyKit is structured for beginners through advanced learners; this is — lesson 1 of 4, so you can start here or from the beginning and move at your own pace.

How long does the “Pods, Deployments, and Services for Models” lesson take?

Most CoddyKit lessons take about 5–10 minutes. Each one is bite-sized and interactive, so you make steady progress and pick up exactly where you left off across the web and the app.

Can I write and run code in this MLOps Academy lesson?

Yes. Every MLOps Academy lesson includes a built-in code editor, so you write and run real code right in your browser and get instant AI feedback — no local setup required.

All lessons in this course

  1. Pods, Deployments, and Services for Models
  2. Request CPU, Memory, and GPU
  3. Configure with ConfigMaps and Secrets
  4. Run Training as a Kubernetes Job
← Back to MLOps Academy