Installing Istio with Grafana Add-On on Kubernetes

Jul 14, 2024

Installing Istio with Grafana Add-On on Kubernetes

Introduction

  • Presenter: Ben Cat
  • Channel: Open Source Channel
  • Video: Installation of Istio with Grafana on Kubernetes
  • Series: Kubernetes and Istio
    • Part of a series of 6-7 videos on Istio
    • Previous videos:
      1. Installation of Istio binary and resources
      2. Deployment of sample BookInfo application

Prerequisites

  • Kubernetes cluster
  • Helm installed
  • MetalLB (for load balancing) or cloud provider's load balancer

Kubernetes Cluster Setup

  • Using Kubernetes in Docker (KinD)
  • Kubernetes version: 1.15.0
  • Nodes:
    • 1 master
    • 2 worker nodes (all in Docker containers)

Tools Installed

  • Helm
  • MetalLB in 'metallb-system' namespace
  • Istio CLI (istioctl)
    • Command to install Istio CLI:
      curl -L https://git.io/getLatestIstio | sh -
      mv istio-<version>/bin/istioctl /usr/local/bin/istioctl
      

Installing Istio

  • Create 'istio-system' namespace
  • Preparation:
    helm install install/kubernetes/helm/istio-init --name istio-init --namespace istio-system
    
  • Install Istio with Grafana:
    helm install install/kubernetes/helm/istio --name istio --namespace istio-system --set grafana.enabled=true
    

Checking Installation

  • Check if Istio components are running:
    kubectl get pods -n istio-system
    
  • Ensure Grafana is installed with Prometheus for metrics collection

Sample Application: BookInfo

  • Label the namespace for Istio sidecar injection:
    kubectl label namespace default istio-injection=enabled
    
  • Deploy BookInfo:
    kubectl apply -f samples/bookinfo/platform/kube/bookinfo.yaml
    kubectl apply -f samples/bookinfo/networking/bookinfo-gateway.yaml
    kubectl apply -f samples/bookinfo/networking/destination-rule-all.yaml
    
  • Verify deployment:
    kubectl get services,pods -n default
    

Accessing Grafana

  • Grafana runs on port 3000, but is exposed internally (ClusterIP by default)
  • Access using port forwarding:
    kubectl -n istio-system port-forward $(kubectl -n istio-system get pod -l app=grafana -o jsonpath='{.items[0].metadata.name}') 3000:3000
    
  • Access Grafana at http://localhost:3000

Grafana Dashboards

  • Dashboards available:
    • Istio: Overview of Istio components
    • Galley: Istio Galley component details
    • Mixer: Metrics aggregation
    • Pilot: Service discovery and configuration
    • Service: Service-level metrics
    • Workload: Application-level metrics

Generating Traffic for Metrics

  • Use curl command to generate traffic to BookInfo application:
    watch -n 2 curl -s -o /dev/null http://<EXTERNAL_IP>/productpage
    
  • Monitor metrics in Grafana

Next Steps

  • Upcoming video: Installing Kiali, a web interface add-on for Istio
  • Questions or comments: Leave them in the video comments section
  • Subscribe and share the video

Conclusion

  • Installing Istio with Grafana provides valuable insights into your Kubernetes and Istio setup.
  • Grafana dashboards help monitor the health and performance of your applications and Istio components.
  • Stay tuned for more tutorials on advanced Istio features.