Advanced Deployment Workshop

This workshop provides a comprehensive exploration of how Kubernetes manages pod lifecycle, from initial scheduling through eviction, and how container images are distributed across your cluster. You will learn the mechanisms that control where pods run, when they are moved or terminated, and how to configure your cluster for optimal performance and reliability.

Shared CLI tools image (OpenShift 102 Workshop)

If you prefer not to install the command-line tools on your laptop, run the workshop’s tools image on the cluster.

It has oc, kubectl, helm, istioctl, jq, yq, git, gpg, curl, wget, skopeo and a docker shim, and an interactive bash session lists them when it starts. You don’t need a local oc client to start it: apply the manifest below from the web console.

Image (change the tag to match the release you deployed):

ghcr.io/shpwrck/openshift-102-workshop-tools:v1.0.14

To start it from the web console:

  1. In the OpenShift web console, select your Project.

  2. Click + in the top bar, then Import YAML.

  3. Paste the manifest below, change its image: line if you mirror images, then click Create.

  4. Go to Workloads → Deployments → openshift-102-workshop-tools, open the Pods tab, select the running pod, then Terminal. Start bash if the terminal opens sh.

apiVersion: apps/v1
kind: Deployment
metadata:
  name: openshift-102-workshop-tools
  labels:
    app.kubernetes.io/name: openshift-102-workshop-tools
    app.kubernetes.io/part-of: openshift-102-workshop
spec:
  replicas: 1
  revisionHistoryLimit: 2
  selector:
    matchLabels:
      app.kubernetes.io/name: openshift-102-workshop-tools
  template:
    metadata:
      labels:
        app.kubernetes.io/name: openshift-102-workshop-tools
    spec:
      containers:
        - name: tools
          image: ghcr.io/shpwrck/openshift-102-workshop-tools:v1.0.14
          imagePullPolicy: IfNotPresent
          resources:
            requests:
              cpu: 50m
              memory: 128Mi
            limits:
              cpu: "1"
              memory: 512Mi

The release’s offline bundle has the same manifest as tools-deployment.yaml, with TOOLS.md, which describes the image, and images-mirror.txt, which lists the images to mirror for a disconnected cluster. The pod keeps running until you delete the Deployment.

Commands in the pod act as the pod’s default ServiceAccount, which has no permissions in your project. Log in as yourself with oc login inside the pod first (in the web console, click your user name, then Copy login command), or ask a project admin to grant the ServiceAccount edit. If the login reports certificate signed by unknown authority, add --certificate-authority=/var/run/secrets/kubernetes.io/serviceaccount/ca.crt to it.

The workshop’s Helm chart, openshift-102-workshop, is in ~/chart in the pod. To install the site from the pod, into your existing project and without a second tools pod:

helm upgrade --install workshop ~/chart \
  --namespace <your-project> \
  --set tools.enabled=false

Leave out --create-namespace, which fails for users who can’t create projects.

The deployed site also serves the chart as a Helm chart repository at /helm/, so you can add it from a workstation without cloning the repository:

helm repo add openshift-102-workshop \
  https://<your-site-route>/helm/

There’s no container engine in the image. docker maps a few commands to skopeo: manifest inspect, pull (to a local directory), image inspect and history.

Overview

The Advanced Deployment Lab covers four critical areas of Kubernetes operations:

  • Module 1 - Pod Scheduling Fundamentals: Understanding the Kubernetes scheduling process, including the filtering and scoring phases, how to use secondary scheduler operators for specialized workload requirements, and pod priority with preemption.

  • Module 2 - Advanced Pod Scheduling: Learning advanced scheduling mechanisms including node affinity, taints and tolerations, Node Feature Discovery, pod affinity and anti-affinity, topology spread constraints with skew values, and resource requirements.

  • Module 3 - Pod Descheduling and Scaling: Exploring descheduling strategies, horizontal pod autoscaling (HPA), vertical pod autoscaling (VPA), and how these components interact with each other.

  • Module 4 - Image Distribution and Optimization: Understanding image pull policies, image placement strategies, lean base images, and the Image Puller operator for optimizing image distribution across your cluster.

Prerequisites

This workshop assumes the following:

  • Basic understanding of Kubernetes concepts (pods, nodes, namespaces)

  • Familiarity with YAML configuration files

  • Access to an OpenShift 4.16 or later cluster (Kubernetes 1.29 or later)

  • Command-line experience with oc

  • Understanding of container images and registries

  • A lab environment prepared as described in Setup Requirements

If you are new to Kubernetes, we recommend reviewing the Kubernetes Concepts documentation before proceeding.

Lab Provisioning (for administrators)

The cluster, operators, attendee roles, workstation tools and images the exercises need, with the provisioning steps and a verification checklist, are on the Setup Requirements page.

Learning Objectives

After completing this workshop, you will be able to:

  • Understand the Kubernetes scheduling process, including filtering and scoring phases

  • Configure and use secondary scheduler operators for specialized workloads

  • Apply advanced scheduling mechanisms: node affinity, taints/tolerations, and topology spread constraints

  • Leverage Node Feature Discovery labels for hardware-aware scheduling

  • Configure pod priority classes and understand preemption behavior

  • Understand pod descheduling strategies and the Descheduler Operator

  • Configure horizontal and vertical pod autoscaling

  • Recognize how HPA, VPA, and Descheduler can interact and potentially conflict

  • Optimize image distribution strategies using image pull policies and the Image Puller operator

  • Choose appropriate base images and understand their impact on deployment performance

  • Diagnose and resolve scheduling failures

  • Implement best practices for pod scheduling, scaling, and resource management