Featured resource
2026 Tech Forecast
2026 Tech Forecast

1,500+ tech insiders, business leaders, and Pluralsight Authors share their predictions on what’s shifting fastest and how to stay ahead.

Download the forecast
  • Lab
    • Libraries: If you want this lab, consider one of these libraries.
    • Core Tech
Google Cloud Platform icon
Labs

Managing Stateful Workloads and Docker Image Optimization

By default, storage on Kubernetes pods is ephemeral, which can put necessary data at risk of deletion when a pod is removed and recreated. In this hands-on lab, you will walk through a scenario in which you set up a service to deploy fleet-wide with persistent storage using StatefulSets, PersistentVolumes and PersistentVolumeClaims. Additionally, you will refactor the Dockerfile for the service to ensure it uses fewer resources, then clean up the internal Docker registry and used workstation, ensuring you’re leaving your working environment in a clean and secure state.

Google Cloud Platform icon
Lab platform
Lab Info
Level
Intermediate
Last updated
Oct 09, 2026
Duration
1h 0m

Contact sales

By clicking submit, you agree to our Privacy Policy and Terms of Use, and consent to receive marketing emails from Pluralsight.
Table of Contents
  1. Challenge

    Configure a persistent storage solution for the backup tool

    Create a PersistentVolume, backup-archive-pv, and a matching PersistentVolumeClaim, backup-archive-pvc, for the backup tool. Ensure the claim mounts to the /backups location on the pod, then test the persistence by running the backup tool on the pod (backup-tool run) to create an archive and confirm its existence (backup-tool list). Delete and recreate the pod and confirm the backup is still there.

  2. Challenge

    Enable dynamic volume provisioning for the backup tool

    Create a StorageClass, backup-storage, and an associated PersistentVolumeClaim, backup-archive-dynamic-pvc. Confirm Kubernetes provisioned a matching volume automatically when a pod is created.

  3. Challenge

    Create a StatefulSet to deploy the backup tool across multiple servers

    Deploy the backup tool as a StatefulSet, backup-fleet, using a volumeClaimTemplate to ensure each replica gets its own storage solution. Scale the StatefulSet up and confirm a new PVC was created. Test replica isolation by setting one replica's mode to ReadWriteOnce and attempting to mount it to another pod.

  4. Challenge

    Refactor the Dockerfile for the backup tool to leverage a multi-stage build

    Refactor the Dockerfile for the backup tool to use a multi-stage build and verify the size difference. Tag the push the image to the provided 10.0.1.104:5000 registry, and remove outdated image tags.

  5. Challenge

    Clean up the workstation for unused Docker resources

    Remove unused Docker containers, images, volumes, and other resources from your workstation

About the author

Pluralsight Skills gives leaders confidence they have the skills needed to execute technology strategy. Technology teams can benchmark expertise across roles, speed up release cycles and build reliable, secure products. By leveraging our expert content, skill assessments and one-of-a-kind analytics, keep up with the pace of change, put the right people on the right projects and boost productivity. It's the most effective path to developing tech skills at scale.

Real skill practice before real-world application

Hands-on Labs are real environments created by industry experts to help you learn. These environments help you gain knowledge and experience, practice without compromising your system, test without risk, destroy without fear, and let you learn from your mistakes. Hands-on Labs: practice your skills before delivering in the real world.

Learn by doing

Engage hands-on with the tools and technologies you’re learning. You pick the skill, we provide the credentials and environment.

Follow your guide

All labs have detailed instructions and objectives, guiding you through the learning process and ensuring you understand every step.

Turn time into mastery

On average, you retain 75% more of your learning if you take time to practice. Hands-on labs set you up for success to make those skills stick.

Get started with Pluralsight