Featured resource
2025 Tech Upskilling Playbook
Tech Upskilling Playbook

Build future-ready tech teams and hit key business milestones with seven proven plays from industry leaders.

Check it out
  • Lab
    • Libraries: If you want this lab, consider one of these libraries.
    • Cloud
Google Cloud Platform icon
Labs

Create Your First Kubernetes Operator

Hey, Gurus! Welcome to this hands-on lab. In this lab, we will take what we have learned and build our Kubernetes operator.

Google Cloud Platform icon
Lab platform
Lab Info
Level
Intermediate
Last updated
Sep 24, 2025
Duration
45m

Contact sales

By filling out this form and clicking submit, you acknowledge our privacy policy.
Table of Contents
  1. Challenge

    Create the Operator Project
    1. Create the operator project directory called memcached-operator in a directory called projects.
    2. Move into the operator project directory that you just created.
    3. Set your GOPATH and enable the Go modules.
    4. Initialize your operator project directory.
  2. Challenge

    Create the API and Controller
    1. Create the API and controller.

      Note: Remember you will need to use additional flags for the memcached image as follows: --plugins="deploy-image/v1-alpha" --image=memcached:1.4.36-alpine --image-container-command="memcached,-m=64,modern,-v" --run-as-user="1001"

    2. Edit the api/v1alpha1/memcached_types.go file.
    3. Change the validation marker for the maximum nodes that can be run from 3 to 5.
    4. Update the code.
    5. Generate the CRD manifests and RBAC manifests.
  3. Challenge

    Deploy the Operator
    1. Log in to Docker Hub from the command line.
    2. Create an enviroment variable for your image.
    3. Make the operator image.
    4. Push your operator image to Docker Hub.
    5. Deploy your operator image to the cluster.
    6. Verify that your image was deployed.
  4. Challenge

    Create the Memcached Custom Resource
    1. Create the memcached custom resource from the cache_v1alpha1_memcached.yaml sample file and change the size from 1 to 3.
    2. Apply your CR to the cluster.
    3. Verify the deployment.
    4. Edit the CR and change the size from 3 to 5.
    5. Apply the changes to the CR.
    6. Verify the changes to test and complete the lab.
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