What This Course Is For
A trained model is a file. Someone wants predictions from it: a web page, a batch job, another team's service. Between the file and that caller sits a long list of practical questions. Which Python and which library versions does the model need? How does it start, and how do you know it is ready? What happens when it runs out of memory, when a new version is wrong, when ten times the usual traffic arrives, or when a thousand rows need scoring at three in the morning?
This course answers those questions with the two tools most teams use for them: Docker, to package the model and its exact runtime into an image, and Kubernetes, to run that image as a service that can be routed to, released, scaled, scheduled and diagnosed. You will do every step yourself on your own computer, and nothing in the course needs an account or costs money.
Who It Is For
You can write and run Python, use a terminal and know what an HTTP request is. You do not need to know Docker or Kubernetes: both are taught from the start, as far as serving a model needs. You do not need machine learning theory, a GPU or a cloud account. The practice model is trained for you by a supplied script from synthetic data, and the course explains only what serving needs to know about it. If you have trained a model with scikit-learn or PyTorch before, the file you deploy will feel familiar; if not, the model lesson explains it.
The course is intermediate in pace. The container and Kubernetes modules explain every concept they use, but they do not linger on tool installation or shell basics beyond a short bridge in the next lesson.
What You Will Build

Read the diagram from the top. The top band is your laptop: a model file,
the inference API that wraps it, the image that packages both, and a small
registry that stores the image. The bottom band is the practice cluster,
itself a single Docker container on your laptop, running Kubernetes. Inside
its aim-practice namespace the Gateway receives requests on
127.0.0.1:18080 and splits them between the stable and the canary
Deployment; the autoscaler adds and removes copies of the stable one; a Job
scores files in batch; a volume caches the model; and kubectl is how you
look at all of it. The dashed green arrow is the cluster pulling the image
from the registry: the moment the two bands connect.
The module numbers show the order. Modules 1 to 3 stay on the laptop, module 4 creates the cluster, modules 5 to 7 add routing, releases, scaling, batch work and diagnosis, and module 8 is a challenge that uses all of it.
How the Modules Build on Each Other
- Start Here: install the tools, train the practice model and learn what the saved file contains.
- Serve a Model as an API: wrap the model in an HTTP service with validation, health and readiness endpoints and metrics, and export a framework-neutral copy with ONNX.
- Containerize the Service: images and containers, the Dockerfile, slim reproducible images, three ways to get a model into a container, Compose for a local stack, and a registry with tags and digests.
- Kubernetes Foundations for Serving: the practice cluster, Pods and Deployments, Services and port-forwarding, ConfigMaps and Secrets, probes that respect model loading, and resource requests and limits.
- Traffic and Releases: Gateway API routing, rolling updates and rollbacks, and canaries.
- Scale and Batch: replicas versus workers, the HorizontalPodAutoscaler, Jobs and CronJobs, persistent volumes and init containers.
- Operate and Troubleshoot: reading logs, events and metrics, diagnosing the common failures, and what changes beyond a laptop.
- Final Challenge: ship model version two with a tested rollback.
The order follows need. The API exists before it is containerised; the image is in a registry before the cluster pulls it; probes are understood before the routing and release lessons depend on them; metrics-server is installed before the autoscaler needs it; and every failure the diagnosis lesson drills has been met once before.
Versions This Course Uses
The practice cluster runs Kubernetes 1.36, pinned to an exact node image so that your results match the lessons. The API image is built on Python 3.14, and the Python packages are pinned to exact versions in every exercise. Kubernetes releases a new minor version three times a year, and the tools around it follow at their own pace, so the lessons name the version each check relies on. Where a feature is newer than Kubernetes 1.33, the lesson says so.
Docker Desktop, the usual way to run Docker on macOS and Windows, is free for personal use, education, non-commercial open source and businesses below a size threshold; larger organisations need a paid subscription. The next lesson gives the exact terms and the Linux alternative, Docker Engine, which is free software.
Three Ways to Study a Lesson
Every lesson has three views of the same material:
- Full Course teaches the topic: the problem it solves, how the tool behaves, a worked example and, in practical lessons, an exercise you run.
- Revision helps you recall the reasoning after you have studied the Full Course: the decisions, the distinctions and the common mistakes.
- Quick Reference lists the commands, manifests and decision tables in a compact form, with the warnings that apply to them.
Start with Full Course. The shorter views assume you have worked through it.
How the Practice Works
Practical lessons end with an exercise on your computer. The exercises share
one project folder, ~/ai-deploy-practice/aim-api, that the model lesson
creates and later lessons extend, plus a cluster that the Kubernetes module
creates; the final challenge works in a sibling folder,
~/ai-deploy-practice/final. Setup blocks in each lesson write the files, so everyone starts from
the same point and you never download course files.
Four rules keep the practice separate from anything else on your computer:
- Owned names. Every image, container, Compose project and Kubernetes
object you create has a name starting with
aim-; the cluster is calledaimand your objects live in the namespaceaim-practice. Two add-ons installed into the cluster later, Envoy Gateway and metrics-server, keep their own names in their own namespaces and go away with the cluster. Checks and cleanup look only for these names. - Local ports. Everything the course publishes listens on
127.0.0.1, the address that means "this computer": ports 18000 to 18009 for local containers, 18080 and 18090 for the cluster's routes, 15000 for the registry. Other devices on your network cannot reach them. - Context checks. Before any Kubernetes exercise changes or deletes
anything, you confirm that
kubectlis pointed at the practice cluster, never at a cluster you use for work. - Cleanup. Containers and clusters keep running after you close the terminal. Every exercise ends by removing what it created and checking that nothing is left; the whole cluster can be deleted and recreated in a few minutes.
Most exercises ask you to predict what a command will print before you run it. Write the prediction down. Comparing it with the real output is the fastest way to find out what you understand.
Output shown in the lessons is marked illustrative. Image IDs, Pod name suffixes, IP addresses, timings and ordering differ on your computer, and each lesson says which parts to compare.
Safety and Cost
The course creates nothing that costs money and needs no account. Downloads are the tools, a few container images and Python packages; the first builds and pulls take minutes on an ordinary connection.
Docker and Kubernetes can delete things; that is part of their job. The
exercises only ever create and remove aim- objects in your local Docker and
the aim cluster. Run them on your own computer, not in a terminal connected
to a shared Docker engine or a work cluster.
Any secret in the exercises is an obviously fake practice value. Never put a real password or key into a practice file, and never load a model file from a source you do not trust: the model lesson explains why a model file is code.
Checking Your Own Work
Each exercise says how to check the result: usually with curl against the
API, docker ps or kubectl get for the objects, and kubectl describe or
logs for the evidence. A command that finishes without an error is not the
check; the check is whether the service behaves as the exercise describes.
Questions have a Your answer box. Write your answer before opening the reasoning. There is no automatic grading: marking a lesson complete records your progress, not your ability. The final challenge is where you show that you can combine the skills without being guided through them.
What the Course Leaves Out
Training and evaluating models, GPU scheduling hands-on, serving large language models, dedicated model servers, managed cloud clusters, Helm chart authoring, GitOps tools and service meshes. The last lesson before the challenge explains how each relates to what you practised, and a sibling course, GPU Infrastructure and Model Serving, continues from there.
Check Your Understanding
- You finish an exercise, skip its cleanup and close the terminal. What is still running, and how would you find it later?
- Why do the exercises check the
kubectlcontext before deleting anything, when the course only ever uses one cluster? - A rollout finishes with no error and you mark the lesson complete. What else should you have checked?
- Which parts of the course need an internet connection, an account or money?
Answer and Reasoning
- The containers the exercise started, and the cluster if the exercise
created it: neither stops when a terminal closes.
docker ps -a --filter name=aim-lists the course's containers, as the container lessons show, andkubectl get deployments,services,pods -n aim-practicelists what a Kubernetes exercise left in the cluster. The clean fix is to run the exercise's cleanup block. - Because
kubectltalks to whichever cluster its current context names, and that can change without you noticing, for example when another tool writes the configuration file. A delete aimed at the practice cluster but sent to a work cluster is the one mistake the course cannot undo for you. - The behaviour the exercise describes: the
curlresponse, the Pods Running and Ready, the version the API reports. "Rolled out" means the cluster did what the manifest said, not that the manifest was right. - Internet access to download tools, images and packages. No account is needed and nothing costs money. Docker Desktop has licence terms for larger organisations, which the next lesson explains along with the free Linux alternative.