1080*80 ad

Install Istio and Observability on Ubuntu 24.04 LTS

Setting up a robust service mesh is crucial for managing microservices efficiently. Istio is a powerful open-source service mesh that provides features like traffic management, security, and observability. This guide walks you through installing Istio and key observability tools on Ubuntu 24.04 LTS.

Prerequisites

Before you begin, ensure you have the following:

  • An Ubuntu 24.04 LTS machine.
  • A Kubernetes cluster accessible from your Ubuntu machine. This could be a local cluster like Minikube or Kind, or a remote cloud-based cluster.
  • The kubectl command-line tool installed and configured to interact with your Kubernetes cluster. You can install it using sudo snap install kubectl –classic or other methods depending on your preference.
  • Helm (recommended for installing observability tools and potentially Istio itself). Install it with commands like snap install helm –classic.
  • Ensure your Kubernetes cluster meets the minimum requirements for Istio regarding version and resources.

Installing Istio

There are two primary ways to install Istio: using the istioctl command-line tool or using Helm. Using istioctl is often the simplest for initial setup and upgrades.

  1. Download Istio:
    Navigate to the Istio release page and download the version compatible with your Kubernetes cluster. You can often use curl for this. For example:
    curl -L https://github.com/istio/istio/releases/download/1.20.3/istio-1.20.3-linux-amd64.tar.gz -o istio.tar.gz
    Replace the version number with the latest stable release.

  2. Extract and Configure:
    Extract the downloaded archive:
    tar xvf istio.tar.gz
    Change into the extracted directory:
    cd istio-1.20.3 (adjust version)
    Add the istioctl binary to your PATH environment variable for easy access:
    export PATH=$PWD/bin:$PATH
    You might want to add this line to your ~/.bashrc or ~/.profile file to make it permanent.

  3. Install Istio Components:
    Use istioctl to install Istio onto your Kubernetes cluster. You can choose different installation profiles based on your needs. The demo profile is a good starting point for evaluation and includes basic observability components. For production, consider the default or production profiles.
    istioctl install –set profile=demo -y
    This command installs the Istio control plane components into the istio-system namespace.

  4. Verify Installation:
    Check that the Istio pods are running in the istio-system namespace:
    kubectl get pods -n istio-system
    Wait until all pods are in a Running or Completed state.

Enabling Observability

Istio integrates well with popular observability tools. While the demo profile includes basic installations of Kiali, Prometheus, and Grafana, you might need to install them separately or with more configuration for production use, often using Helm.

Installing Observability Tools (Using Helm is common)

If they weren’t installed with your chosen Istio profile or you need a more robust setup, you can install them using Helm.

  1. Add Prometheus and Grafana Repositories:
    helm repo add prometheus-community https://prometheus-community.github.io/helm-charts
    helm repo add grafana https://grafana.github.io/helm-charts
    helm repo update

  2. Install Prometheus:
    Install Prometheus into a dedicated namespace (e.g., observability).
    kubectl create namespace observability
    helm install prometheus prometheus-community/prometheus -n observability

  3. Install Grafana:
    Install Grafana, linking it to your Prometheus instance.
    helm install grafana grafana/grafana -n observability

  4. Install Kiali (Service Mesh Dashboard):
    Kiali is specifically designed for visualizing the Istio service mesh. Its installation often depends on your Istio version and installation method. If not included in your Istio profile, refer to the Kiali documentation for the Helm chart or operator installation specific to your Istio version. A common Helm approach involves adding the Istio or Kiali charts repo and installing:
    helm repo add kiali https://kiali.org/helm-charts
    helm install kiali kiali/kiali -n istio-system –set auth.strategy=anonymous (Adjust namespace and auth as needed)

  5. Install Tracing (Jaeger or Zipkin):
    Tracing helps visualize request flows through your services. Istio supports Jaeger and Zipkin. The demo profile often includes Jaeger. For standalone installation, you can use Helm.
    helm repo add jaegertracing https://jaegertracing.github.io/helm-charts
    helm install jaeger jaegertracing/jaeger -n observability (Or istio-system, depending on preference)

Accessing Observability Dashboards

To access the dashboards, you typically need to port-forward the service running the UI to your local machine.

  • Kiali:
    kubectl port-forward svc/kiali 20001:20001 -n istio-system
    Access Kiali at http://localhost:20001.

  • Grafana:
    Find the Grafana service name and port.
    kubectl get svc -n observability
    kubectl port-forward svc/grafana 3000:80 -n observability (Adjust service name and ports)
    Access Grafana at http://localhost:3000. The default login is often admin/prom-operator or admin/admin (check Helm chart notes).

  • Prometheus:
    kubectl port-forward svc/prometheus-server 9090:80 -n observability (Adjust service name and ports)
    Access Prometheus UI at http://localhost:9090.

  • Jaeger:
    kubectl port-forward svc/jaeger-query 16686:16686 -n observability (Adjust service name and ports)
    Access Jaeger UI at http://localhost:16686.

Testing the Setup

To see Istio and the observability tools in action, deploy a sample application (like the Istio Bookinfo example) into a namespace where Istio sidecar injection is enabled.

  1. Enable Istio Injection for a Namespace:
    Label the namespace where you want to deploy your application:
    kubectl label namespace default istio-injection=enabled (Replace default with your namespace)

  2. Deploy a Sample Application:
    Use kubectl apply -f with the manifest files for your application. Ensure the pods show 2/2 or more ready containers, indicating the Istio sidecar has been injected.

  3. Generate Traffic:
    Send requests to your application’s entry point (e.g., via Istio Ingress Gateway).

  4. Observe:
    Now, check the Kiali dashboard to see the service graph, Prometheus for metrics, Grafana for visual dashboards, and Jaeger for traces of requests passing through your service mesh.

Conclusion

You have successfully installed Istio and configured basic observability tools on your Ubuntu 24.04 LTS system. This setup provides a foundation for advanced traffic management, enhanced security, and deep insights into the behavior of your microservices within the Istio service mesh. From here, you can further configure Istio rules, set up more sophisticated monitoring dashboards, and integrate with other tools.

Source: https://www.fosstechnix.com/installing-istio-service-mesh-with-observability-add-ons-on-ubuntu-24-04-lts/

900*80 ad

      1080*80 ad