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

Minikube: Deploying to Our Cluster

In this hands-on lab we will be creating a deployment from scratch, using a YAML template, and deploying it to our Minikub cluster. Once everything looks like it's up and running, we'll run some tests.

Google Cloud Platform icon
Lab platform
Lab Info
Level
Beginner
Last updated
Aug 30, 2025
Duration
30m

Contact sales

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

    Start the Minikube Cluster Using the Correct Driver

    Issue the command to start Minikube:

    sudo minikube start --vm-driver none
    
  2. Challenge

    Create an Nginx Deployment from the Template

    We can create the deployment using the file ~/nginx-deploy-template.yaml. Use the Nginx pv-deployment.yaml file as a reference if needed.

    Our deployment should look similar to this:

    kind: Service
    apiVersion: v1
    metadata:
        name: nginx-service
        labels:
          app: nginx-volume
    spec:
        type: NodePort
        selector:
          app: nginx-volume
        ports:
            - nodePort: 30002
              port: 8080
              targetPort: 80
    ---
    apiVersion: v1
    kind: PersistentVolume
    metadata:
      name: nginx-stor
      labels:
        app: nginx-deploy
        type: local
    spec:
      storageClassName: manual
      capacity:
        storage: 10Gi
      accessModes:
        - ReadWriteOnce
      hostPath:
        path: "/home/cloud_user/indexdoc"
    ---
    apiVersion: v1
    kind: PersistentVolumeClaim
    metadata:
      name: nginx-pvc
      labels:
        app: nginx-deploy
    spec:
     storageClassName: manual
     accessModes:
       - ReadWriteOnce
     resources:
       requests:
         storage: 3Gi
    ---
    apiVersion: apps/v1 # for versions before 1.9.0 use apps/v1beta2
    kind: Deployment
    metadata:
      name: nginx-deployment
      labels:
        app: nginx-deploy
    spec:
      selector:
        matchLabels:
          app: nginx-deploy
      strategy:
        type: Recreate
      template:
        metadata:
          labels:
            app: nginx-deploy
        spec:
          containers:
              - name: nginx-cont
                image: nginx
                ports:
                - containerPort: 80
                volumeMounts:
                - name: nginx-vol
                  mountPath: "/usr/share/nginx/html"
          volumes:
          - name: nginx-vol
            persistentVolumeClaim:
              claimName: nginx-pvc
    
  3. Challenge

    Create the Index File and Create the Nginx Deployment

    Run the following to create the index:

    mkdir ~/indexdoc
    echo 'this is the local index file' > ./indexdoc/index.html
    

    Now let's create the Nginx deployment using kubectl:

    sudo kubectl create -f ~/nginx-deployment-template.yaml
    

    We need make sure the Nginx pod is up and running, and get its IP:

    sudo kubectl get po -o wide
    

    And now we can run curl on that IP, to see if the index loads:

    curl <POD_IP>
    

    The output of that should be the this is the local index file that we put in ./indexdoc/index.html a couple minutes ago.

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