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

Managing an Application with Istio

In this lab, we're going to enable monitoring in our Istio mesh, using both Prometheus and Grafana. Once we have the ports forwarded to `localhost` on the master node, we will need to implement an Nginx proxy to allow outside access.

Google Cloud Platform icon
Lab platform
Lab Info
Level
Advanced
Last updated
Apr 06, 2025
Duration
1h 30m

Contact sales

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

    Install Istio in Kubernetes and Deploy the bookinfo Application

    Get the Istio installation package and unpack it:

    [cloud_user@km]$ wget https://github.com/istio/istio/releases/download/1.0.6/istio-1.0.6-linux.tar.gz
    [cloud_user@km]$ tar -xvf istio-1.0.6-linux.tar.gz
    

    Add istioctl to our path:

    [cloud_user@km]$ export PATH=$PWD/istio-1.0.6/bin:$PATH
    

    Set Istio to NodePort type, and set the nodePort to port 30080:

    [cloud_user@km]$ sed -i 's/LoadBalancer/NodePort/;s/31380/30080/' ./istio-1.0.6/install/kubernetes/istio-demo.yaml
    

    Bring up the Istio control plane:

    [cloud_user@km]$ kubectl apply -f ./istio-1.0.6/install/kubernetes/istio-demo.yaml
    

    Verify that the control plane is running, but note that it may take a minute or two:

    [cloud_user@km]$ kubectl -n istio-system get pods
    

    Install the bookinfo application with manual sidecar injection:

    kubectl apply -f <(istioctl kube-inject -f istio-1.0.6/samples/bookinfo/platform/kube/bookinfo.yaml)
    

    Verify that the application is running and that there are 2 containers per pod. This may take another minute or so:

    [cloud_user@km]$ kubectl get pods
    

    Create an ingress and virtual service for the application:

    [cloud_user@km]$ kubectl apply -f istio-1.0.6/samples/bookinfo/networking/bookinfo-gateway.yaml
    

    Now, in a web browser, let's verify the page loads at the URL http://<kn1_PUBLIC_IP ADDRESS>:30080/productpage.

  2. Challenge

    Configure the Forwarder, Install Nginx, and Access the Grafana Dashboard

    Configure Grafana to forward to localhost:

    [cloud_user@km]$ kubectl -n istio-system port-forward $(kubectl -n istio-system get pod -l app=grafana -o jsonpath='{.items[0].metadata.name}') 3000:3000 &
    

    Install and configure Nginx to proxy to the Grafana port:

    [cloud_user@km]$ sudo apt install -y nginx
    

    Change the Nginx config by editing /etc/nginx/sites-enabled/default with whichever text editor you like (but remember privileges, and run something like sudo vi...). Comment out all existing lines in the location / directive, and add proxy_pass http://127.0.0.1:3000. The results should look like this:

    location / {
        # First attempt to serve request as file, then
        # as directory, then fall back to displaying a 404.
        #try_files $uri $uri/ =404;
        proxy_pass http://127.0.0.1:3000;
    }
    

    Then restart Nginx:

    [cloud_user@km]$ sudo systemctl restart nginx
    

    Load Grafana at http://<km_PUBLIC_IP ADDRESS/dashboard/db/istio-mesh-dashboard and review the installed Istio dashboards.

    If the mesh traffic dashboard does not populate when the application is refreshed, then rerun this command to re-apply the mixer configuration:

    [cloud_user@km]$ kubectl apply -f ./istio-1.0.6/install/kubernetes/istio-demo.yaml
    
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