🌐

Introduction to Kyani Web Interface for Istio

Jul 14, 2024

Introduction to Kyani Web Interface for Istio

Welcome Remarks

  • Presenter: Ben Cat
  • Channel: Just Me Open Source
  • Focus: walkthrough on Kyani web interface for visualizing Istio components and service mesh traffic.

Previous Videos Overview

  • Topics covered:
    • How to add Grafana to Istio deployment.
    • Using Istio with Grafana and Kyani.
  • Recommendations: Watch the last three videos to understand Istio binary deployment, resources in Kubernetes cluster, and deploying the sample Bookinfo application.

Technical Setup

  • Current Setup: Kubectl Version: 1.15.0
  • Running Kubernetes: In Docker Kind
  • Requirements:
    • Kubernetes cluster.
    • Helm installed.
    • Load balancing solution like MetalLB.

Installing Istio

  1. Check namespace and nodes: kubectl get nodes
    • Three nodes: one master, two worker nodes, all Docker containers.
  2. Download Istio: curl -L <URL> | sh
    • This gives the Istio directory with manifests for sample applications and deployments.
  3. Install Istio using Helm: (Two phases)
    • Initialization (istio-init Helm chart): Deploys CRDs
    • Istio core components (istio Helm chart): Main Istio components with additional add-ons like Grafana and Kyani.

Important Pre-Step: Creating Secrets for Kyani

  • Create a secret for Kyani web interface login credentials.
    • Commands (using environment variables and kubectl): export KIALI_USERNAME=admin export KIALI_PASSPHRASE=admin kubectl create secret generic kiali -n istio-system --from-literal=username=$KIALI_USERNAME --from-literal=passphrase=$KIALI_PASSPHRASE
  • Verify Secret Creation: kubectl describe secret kiali -n istio-system

Deploying Istio with Grafana and Kiali

  • Helm command: helm install install/kubernetes/helm/istio --name istio --namespace istio-system --set grafana.enabled=true --set kiali.enabled=true
  • Optional Configuration: Set Grafana URL for Kiali.
    • Add: --set kiali.dashboard.grafanaURL=http://grafana:3000

Sample Application Deployment: Bookinfo

  • Steps:
    1. Label the namespace: kubectl label namespace default istio-injection=enabled
    2. Deploy application: kubectl create -f samples/bookinfo/platform/kube/bookinfo.yaml
    3. Deploy gateway: kubectl create -f samples/bookinfo/networking/bookinfo-gateway.yaml
    4. Define destination rules: kubectl create -f samples/bookinfo/networking/destination-rule-all.yaml

Accessing Kiali Dashboard

Port Forwarding Kiali Service

  • Port-Forward Command: kubectl port-forward svc/kiali -n istio-system 20001:20001
  • Access URL: http://localhost:20001

Kiali Interface Overview

  1. Login with credentials set in the secret (default: admin/admin).
  2. Dashboard Layout: Sidebar with options: Graph, Applications, Workloads, Services, Istio Configs.
  3. Graph Visualization:
    • Shows traffic flow and health.
    • Different views: app graph, versioned app graph, service graph, workload graph.
    • Traffic management: labels on edges, traffic animation to visualize flow and identify issues.
    • Generate Traffic for Visualization: Use curl command to send requests.
  4. Viewing Different Components:
    • Applications: Lists microservices within namespaces.
    • Workloads: Describes tasks running microservices.
    • Services: Lists services provided by microservices.
    • Istio Config: Shows Istio custom resource configurations.
  5. Graph Details: Click on components to get more details.
    • Provides insights and allows for dynamic management.

Future Video Teaser

  • Next Topics: Request routing and traffic management using Kiali and Istio.
  • Practical Example: Adjusting traffic flow to specific microservice versions, header-based routing, and making changes via Kiali UI and YAML files for permanence.

Closing Remarks

  • Feedback Request: Comments and questions encouraged.
  • Call to Action: Share, like, and subscribe.
  • Personal Note: First-time exploration of Istio, viewers' requests acknowledged.