liveBook · Manning

Kubernetes Deployment

As explained in Machine Learning Platform Engineering

A Deployment is a Kubernetes resource that declaratively manages application updates, scaling, and the ReplicaSets underlying its pods.

A Deployment declares the desired state of an application and coordinates its ReplicaSet and pods. It supports reproducible creation, scaling, image updates, status inspection, and rollback through YAML and kubectl. section 3.3.3

Listing 3.4 pod.yaml: creating a pod
apiVersion: v1    #1
kind: Pod    #2
metadata:
  name: joker    #3
spec:
  containers:
  - name: hello-joker    #4
    image: <docker_hub_repo>:hello-joker:v1    #5
    ports:
    - containerPort: 8083    #6

Use the deployment manifest to connect API version, object kind, metadata, pod template, container image, replica count, and label selector. section 3.3.3

A practical Deployment workflow includes:

  • Create the Deployment with kubectl and verify READY, UP-TO-DATE, and AVAILABLE counts. section 3.3.3
  • Change the container image and apply the manifest to trigger ReplicaSet scaling between revisions. section 3.3.3
  • Inspect controller events and undo a rollout when the new revision is unsuitable. section 3.3.3

How Machine Learning Platform Engineering covers it

How deep it goes
Defines manifests, selectors, replicas, updates, status checks, controller events, and rollback, without detailing controller internals.
Examples
Uses a three-replica hello-joker deployment, image revision v2, status output, scaling events, and rollout undo.
What it assumes
Assumes basic container and Kubernetes context while teaching object fields, labels, replicas, selectors, and kubectl interactions.
What you can do after
Operate/configure a Deployment, update its image, inspect rollout health, and undo the revision with kubectl.
How it connects
Connects Kubernetes objects, pods, ReplicaSets, YAML, kubectl, labels, and container images.

Also explained in

Compare how 10 books explain Kubernetes Deployment →

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Machine Learning Platform Engineering. The section links point to the parts of the book it draws on.