Kubernetes Series: Istio Service Mesh - Deploying BookInfo Application

Jul 14, 2024

Kubernetes Series: Istio Service Mesh - Deploying BookInfo Application

Introduction

  • Series Context: Second video in the Istio series, part of the larger Kubernetes series.
  • Previous Video: Introduction to Istio, installation of Istio components.
  • Prerequisites: Needs a Kubernetes cluster with Helm Tiller, MetalLB, and Istio installed.

Application Overview: BookInfo

  • Purpose: Demonstrates various Istio features: service discovery, traffic management, load balancing, secure communication.
  • Architecture:
    • Product Page Microservice: Written in Python
    • Reviews Microservice: Three versions, written in Java
    • Details Microservice: Written in Ruby
    • Ratings Microservice: Written in Node.js

Traffic Management

  • Reviews Microservice Versions:
    • Version 1: No rating functionality
    • Version 2: Includes rating functionality (black stars)
    • Version 3: Enhanced rating functionality (red stars)
  • Demonstrates traffic policies, routing, and version management.

Deployment Steps

  1. Label Namespace for Istio Injection:
    • Command: kubectl label namespace default istio-injection=enabled
  2. Deploy Resources:
    • Command: kubectl create -f samples/bookinfo/platform/kube/bookinfo.yaml
  3. Check Resources:
    • Command: kubectl get all

Configuration

  • Ingress Gateway: Entry point for the application
  • Sidecars (Envoy Proxies): Deployed for each microservice
  • Verify Pods: Ensure all necessary pods are running

Accessing the Application

  • Intra-Cluster Access:

    • kubectl exec -it [pod name] -- /bin/sh
    • Use curl to verify internally accessible: curl [service name]:9080/productpage | grep '<title>'
  • External Access:

    • Ingress IP: Retrieve with kubectl get service istio-ingressgateway -n istio-system
    • Deploy Gateway:
      • Command: kubectl create -f samples/bookinfo/networking/bookinfo-gateway.yaml
    • Verify Gateway:
      • Command: kubectl get gateway
    • Access URL: e.g., http://[ingress IP]/productpage

Load Balancing & Traffic Routing

  • Default Policy: Round-robin between versions of Reviews microservice
  • Verification: Refresh the webpage to see different versions of Reviews being loaded

Future Work

  • Routing Policies: Direct traffic based on headers, user agents, or specific requests.

Conclusion

  • Next Steps: More videos on Istio features
  • Call to Action: Questions and comments are welcomed; subscribe for future content.