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 Microservices

In this hands-on lab we will be deploying microservices to our Minikube cluster. We will deploy the robot-shop example application into its own name space, and then ensure that all of the services are started and running. Once that is done, we will access the robot-shop application via proxy and ensure that it is working as expected.

Google Cloud Platform icon
Lab platform
Lab Info
Level
Beginner
Last updated
Sep 12, 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

    Run the command:

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

    Deploy Robot-Shop in Its Own Namespace

    In the user's home directory, there is a robot-shop directory, and within it a K8s subdirectory. Let's get into it:

    cd ~/robot-shop/K8s
    

    Now that we're there, we can create a namespace for the resources:

    sudo kubectl create namespace robot-shop
    

    Then we can create the resources in the namespace:

    sudo kubectl -n robot-shop apply -f ./descriptors/
    

    Let's monitor the pods to ensure that they come up:

    sudo kubectl -n robot-shop get po -w
    

    Once all of the pods have come up this task is complete.

  3. Challenge

    Edit the Web Service, Configure the Proxy, and Test the Application

    Let's take a closer look at the web service:

    sudo kubectl -n robot-shop get svc web
    

    Its TYPE is currently LoadBalancer, and that's not what we want here. We need to edit the web service and change its type to NodePort:

    sudo kubectl -n robot-shop edit svc web
    

    We'll land in a vim session. The spec section should look like this (minus the comments) when we're done:

    spec:
     ports:
     - name: "8080"
       port: 8080
       protocol: TCP
       targetPort: 8080
       nodePort: 30080    <-- ensure that the nodePort it set to this value
     selector:
       service: web
     sessionAffinity: None
     type: NodePort    <---- change from LoadBalancer
    

    Now let's take another look at the web service:

    sudo kubectl -n robot-shop get svc web
    

    Its TYPE should be NodePort now.

    Now let's get the URL of the web service:

    sudo minikube service list
    

    We need the TARGET_PORT of the web service for this next step. We've got to edit the Nginx configuration and set the port forwarding to the NodePort URL:

    sudo vim /etc/nginx/sites-enabled/default
    
    
        location / {
                   # First attempt to serve request as file, then
                   # as directory, then fall back to displaying a 404.
                   proxy_pass http://<minikube IP>:<svc port>;
    

    Once that's done, we can restart Nginx:

    sudo systemctl restart nginx
    

    Finally, we can test in a web browser. If we exit in the terminal, we'll get the server's public IP. We can also get it from the hands-on lab overview page. But browse to it, and we should see the robot-shop application up and running. Feel free to tool around and look at the different robots. If you can, it means we're through setting things up.

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