Deploying AI Models with Docker and Kubernetes

Study Deploying AI Models with Docker and Kubernetes with full lessons, revision notes and quick reference, across 29 lessons.

8 modules. 29 lessons. Self-paced.

Roles this course prepares you for

Course curriculum

No exam weights apply. Lessons follow practical prerequisites, from a model file on the laptop to a routed, autoscaled, canaried service on a local Kubernetes cluster.

Free to read: 5 lessons, no account needed

Start Here (3 lessons)
  1. How this course works (read now)

    • Describe what the course builds, from a model file to a routed, autoscaled service on a local Kubernetes cluster, and the versions it uses.
    • Explain the safety rules for aim- names, the aim-practice namespace, 127.0.0.1 ports and cleanup, and why nothing in the course costs money.
  2. Install Docker, kubectl and kind (read now)

    • Install Docker, kubectl and kind from official sources and confirm each works with a readiness command.
    • Explain which tool owns images, which talks to a cluster and which runs the cluster, and apply the one-minor kubectl skew rule.
  3. Meet the practice model (read now)

    • Train the practice model with the supplied script in a virtual environment and explain what the saved artifact contains.
    • Explain why the serving environment must pin the same library versions and why a joblib file is code, not data.
Serve a Model as an API (3 lessons)
  1. Build the inference API (read now)

    • Wrap the model in a FastAPI service with typed request and response models and a predict endpoint, and run it locally with uvicorn.
    • Explain what happens to an HTTP request from curl to the model and back, including validation failures.
  2. Health, readiness and metrics endpoints (read now)

    • Add separate liveness and readiness endpoints, structured logging and a Prometheus-format metrics endpoint to the API.
    • Explain which question each endpoint answers and why Kubernetes needs them to differ.
  3. Portable model artifacts with ONNX

    • Export the pipeline to ONNX with skl2onnx and serve it with onnxruntime, comparing predictions with the joblib model.
    • Explain what ONNX gives up and gains, and when a framework-neutral artifact is worth it.

With course access: 24 lessons

Containerize the Service (6 lessons)
  1. Images, containers and the Docker engine

    • Distinguish an image from a container, run a container with a name, a 127.0.0.1 port and environment variables, and inspect, log into and remove it.
    • Explain what persists after a container is removed and what the Docker engine does when docker run is executed.
  2. Write the Dockerfile

    • Write a Dockerfile that installs pinned dependencies before copying code, runs as a numeric non-root user and starts uvicorn in exec form, then build and run aim-api:0.1.0.
    • Explain how instruction order affects cache hits and why a named USER is rejected by Kubernetes' runAsNonRoot.
  3. Slim, reproducible images

    • Rebuild the image as a two-stage build on a digest-pinned slim base, inspect size and layers, and repair a Dockerfile with three faults.
    • Explain which choices affect size, which affect reproducibility and which affect security.
  4. Get the model into the container

    • Compare baking a model into the image, mounting it and fetching it at startup, and implement each with the small and the large model.
    • Choose a delivery path for a given artifact size and release cadence and explain the trade-off.
  5. Run the stack locally with Compose

    • Describe the API and a model-store container in compose.yaml with pinned images, 127.0.0.1 ports, environment, a healthcheck and depends_on, and operate the stack.
    • Explain what Compose is for and where Kubernetes takes over.
  6. Tags, digests and registries

    • Run a local registry, tag and push the image with the registry host and port, read tags and digests, and explain why latest is a deployment risk.
    • Explain how the kind cluster will pull from the registry and how multi-platform images relate to the Mac's arm64 build.
Kubernetes Foundations for Serving (6 lessons)
  1. Why Kubernetes, and the practice cluster

    • Explain desired state, the control plane, nodes and the kubelet, and what Kubernetes does and does not do for a model service.
    • Create the aim cluster from the course configuration, confirm the context and the port mappings, and connect it to the local registry.
  2. Pods, ReplicaSets and Deployments

    • Read and write a Deployment manifest, apply it, and explain how Deployments, ReplicaSets and Pods relate through labels and ownerReferences.
    • Predict what kubectl get pods shows after deleting a Pod, scaling and changing the image.
  3. Services, DNS and port-forwarding

    • Expose the Deployment with a ClusterIP Service and a NodePort Service, reach it from inside the cluster by DNS name, from the laptop through port-forward and through the kind port mapping.
    • Explain selectors, port versus targetPort, EndpointSlices and what happens when a selector matches nothing.
  4. ConfigMaps and Secrets

    • Move the model path and log level into a ConfigMap and a practice token into a Secret, inject them as environment variables and files, and prove the token is not in the image.
    • Explain what a Secret protects, what it does not, and when a changed value reaches a running container.
  5. Probes that respect model loading

    • Add startup, readiness and liveness probes sized for the model's load time and show, with a simulated slow load, why the startup probe prevents restart loops.
    • Predict restart counts and Ready state for given probe settings.
  6. Requests, limits and Quality of Service

    • Set CPU and memory requests and limits that reflect inference cost, read the resulting QoS class, and reproduce an OOMKilled container and a Pending Pod.
    • Explain how requests drive scheduling and how limits are enforced.
Traffic and Releases (3 lessons)
  1. Route external traffic with Gateway API

    • Install Envoy Gateway, define a GatewayClass, a Gateway on NodePort 30080 and an HTTPRoute for the API, and reach it on 127.0.0.1:18080.
    • Explain the roles in Gateway API, read an Ingress manifest, and explain why Ingress is frozen and Ingress NGINX retired.
  2. Rolling updates and rollbacks

    • Roll out the image that carries model version 2 with a recorded change cause, read rollout status and history, and roll back.
    • Predict how many Pods run during an update with given maxSurge and maxUnavailable.
  3. Canary releases for model versions

    • Run a canary first with two Deployments behind one Service and a replica ratio, then with weighted HTTPRoute backends, and measure the split by counting responses.
    • Compare the two mechanisms and explain when each is enough.
Scale and Batch (4 lessons)
  1. Scale inference: replicas and workers

    • Explain why CPU-bound inference scales with replicas rather than uvicorn workers under Kubernetes, install metrics-server and read kubectl top.
    • Scale the Deployment by hand and observe CPU and memory per Pod under a small load.
  2. Autoscale with the HorizontalPodAutoscaler

    • Create an HPA on CPU utilisation, drive it with a bounded in-cluster load Job and predict replica changes from the formula.
    • Explain tolerance, the stabilization window and why requests are required.
  3. Batch inference with Jobs and CronJobs

    • Score a file of readings with a Job that runs the API image's batch command, read its logs and status, and schedule it with a CronJob.
    • Explain restartPolicy, backoffLimit, ttlSecondsAfterFinished and concurrencyPolicy.
  4. Persistent volumes and init containers

    • Create a PersistentVolumeClaim from the default StorageClass, fill it with the model through an init container and show a restart hits the cache.
    • Explain PV, PVC and StorageClass, access modes and what an init container can and cannot do.
Operate and Troubleshoot (3 lessons)
  1. Observe the running service

    • Use kubectl logs across replicas, events, kubectl top, exec and the API's own metrics endpoint to describe how the service is behaving.
    • Explain which signal answers which question and what each cannot tell you.
  2. Diagnose the common failures

    • Diagnose Pending, ImagePullBackOff, CrashLoopBackOff, OOMKilled, failing probes and a Service with no endpoints from their evidence and apply the smallest safe fix.
    • Explain the back-off behaviours behind the Waiting reasons.
  3. Beyond the laptop: GPUs, model servers and managed clusters

    • Explain GPUs and device plugins, dedicated model servers and large-model loading, managed clusters and hosted registries, Helm and delivery pipelines, and relate each to a pattern practised in the course.
    • Say which production concerns need an account, hardware or a budget, and where the sibling GPU course continues.
Final Challenge (1 lessons)
  1. Ship model version two

    • Take a supplied model version 2 and a set of broken manifests to a routed, autoscaled, canaried release with a tested rollback, using only taught skills.
    • Justify each configuration choice against the acceptance checks.

Study views

  • Full Course
  • Revision
  • Quick Reference

Unlock all 29 lessons

Course access opens every lesson and adds revision notes, the Quick Reference, saved progress, bookmarks and your own notes.

INR 199 plus 18% GST. 90 days of online access. No auto-renewal.

Know what is included

Independent learning material from Vectametric. Not affiliated with or endorsed by the organisations behind the tools it teaches. Practice exams and projects are separate. Completing a course is not a professional certification.

Questions about courses

Are these video courses or reading courses?

The current courses use written lessons, examples and diagrams. Full Course, Revision and Cheat Sheet or Quick Reference views cover the same learning sequence at different levels of detail.

Which course should I start with?

Choose a Certification Course for a named exam, a Career Path Course for a role-led sequence, or a Skill Course for a focused subject. Read its level, prerequisites and curriculum before enrolling.

Do revision notes replace the full lessons?

No. Start with the full explanations, then use revision notes to refresh your understanding. Cheat sheets are concise study references, not a substitute for learning or permission to use notes during an official exam.

Are practice exams and projects included?

No. Course access, practice-exam bundles and project access are separate. An official certification, exam booking or voucher is not included.

How long do I have access?

The course page and checkout show the current online access period and price, including free enrollment where offered. Access starts when enrollment is confirmed and does not auto-renew.

Can I read lessons before enrolling?

Yes. Each course opens its first lessons to read without an account, and some courses are open in full. The course curriculum marks the lessons you can read now. Course access adds the remaining lessons, the Revision and Cheat Sheet or Quick Reference views, saved progress, bookmarks and personal notes.

Review the Terms and No-Refund Policy before confirming access. All sales are final; Vectametric does not offer refunds.

This website is operated by VECTAMETRIC EDTECH (OPC) PRIVATE LIMITED, operating as Vectametric.

Corporate Identity Number (CIN): U85499KA2026OPC229822. GSTIN: 29AAMCV8281D1ZS. Registered office: RS NO/38/2A/1 BASTAND, ROAD MAHANTESH NAGAR, Ramdurg, Ramdurg, Belgaum- 591123, Karnataka.

Queries and grievances: Prajval Honnungar, Grievance Officer and Data Protection Contact.

Telephone: +91 94800 09310. Support: support@vectametric.com. Grievances: support@vectametric.com.

Copyright 2026 VECTAMETRIC EDTECH (OPC) PRIVATE LIMITED. All rights reserved.

Vectametric home · Roadmaps · Vecta IT Exams · Vecta Government Exams · Vecta Banking & Finance Exams · Vecta Entrance Exams · About us · Contact · Privacy Policy · Terms and Conditions · No-Refund Policy