A Step-by-Step Guide to Installing and Using Kiali.io for Microservices Observability
Installing and Using Kiali.io: A Comprehensive Guide
Kiali.io is an open-source observability platform that offers real-time monitoring and visualization of microservices topology and interactions. It is a powerful tool that simplifies the management and monitoring of microservices, enabling users to identify and troubleshoot issues more efficiently. In this article, we will provide a step-by-step guide to installing Kiali.io and exploring its features.
Overview of Kiali.io
Kiali.io provides a comprehensive observability platform that enables users to manage, monitor, and secure their microservices environment more efficiently. With its advanced features and integration capabilities, Kiali.io simplifies the management and monitoring of microservices, enabling users to focus on developing and deploying new services. Some of the key features of Kiali.io include microservices topology visualization, traffic management, metrics and tracing, security, and integration with popular service mesh technologies.
Benefits of Kiali.io
Kiali.io offers numerous benefits for developers and operators working with microservices. Some of these benefits include improved visibility, enhanced performance, better security, and increased productivity. By providing real-time visibility into the microservices environment, Kiali.io enables users to monitor and troubleshoot issues more efficiently. It also provides detailed metrics and tracing information for microservices, enabling users to optimize resource allocation and improve the overall performance of their services. With its advanced security features, Kiali.io helps users secure their microservices environment and detect potential security threats. By simplifying the management and monitoring of microservices, Kiali.io enables users to focus on developing and deploying new services.
Step-by-Step
Pre-Installation
For requirements, please visit https://kiali.io/docs/installation/installation-guide/prerequisites/
Installation
in this article, we will install kiali as an addons on istio
1. Download & Install Istio
curl -L https://istio.io/downloadIstio | ISTIO_VERSION=1.6.14 TARGET_ARCH=x86_64 sh -
vi .bashrc
....
export ISTIO_HOME=~/istio-1.6.14
export PATH=$ISTIO_HOME/bin:$PATH
export KUBECONFIG=/etc/kubernetes/admin.conf
...
source .bashrc
istioctl install --set profile=demo -y
For production, we recommend using the default profile
2. Install kiali addons(profile default)
istioctl install --set profile=default -y
kubectl apply -f samples/addons/kiali.yaml
Check list profile in istio: This Link
Expose Kiali
Port forward(manual)
screen -R forward
kubectl port-forward svc/kiali --address 10.6X.6X.100 20001:20001 -n istio-system
# hit ctrl + A + D
Create gateway dan virtual service
kubectl apply -f - <<EOF
apiVersion: networking.istio.io/v1alpha3
kind: Gateway
metadata:
name: kiali-gateway
namespace: istio-system
spec:
selector:
istio: ingressgateway
servers:
- port:
number: 80
name: http-kiali
protocol: HTTP
hosts:
- "*"
---
apiVersion: networking.istio.io/v1alpha3
kind: VirtualService
metadata:
name: kiali
namespace: istio-system
spec:
hosts:
- "*"
gateways:
- kiali-gateway
http:
- match:
- uri:
prefix: /kiali
route:
- destination:
port:
number: 20001
host: kiali
---
apiVersion: networking.istio.io/v1alpha3
kind: DestinationRule
metadata:
name: kiali
namespace: istio-system
spec:
host: kiali
trafficPolicy:
tls:
mode: DISABLE
---
EOF
Deploy Simple Microservice for testing
Download Microservice Customer
wget https://github.com/redhat-scholars/istio-tutorial/archive/1.4.x.zip
tar -xvzf 1.4.x.zip
cd istio-tutorial-1.4.x/
Create namespace tutorial
kubectl create namespace tutorial
Deploy customer service
kubectl apply -f <(istioctl kube-inject -f customer/kubernetes/Deployment.yml) -n tutorial
kubectl create -f customer/kubernetes/Service.yml -n tutorial
Expose customer
kubectl create -f customer/kubernetes/Gateway.yml -n tutorial
kubectl get pods -w -n tutorial
kubectl get svc istio-ingressgateway -n istio-system
GATEWAY_URL=$(kubectl get svc istio-ingressgateway -n istio-system|awk '{print $3}'|grep -iv cluster)
Deploy preference service
kubectl apply -f <(istioctl kube-inject -f preference/kubernetes/Deployment.yml) -n tutorial
kubectl create -f preference/kubernetes/Service.yml -n tutorial
kubectl get pods -w -n tutorial
Deploy preference service
kubectl apply -f <(istioctl kube-inject -f preference/kubernetes/Deployment.yml) -n tutorial
kubectl create -f preference/kubernetes/Service.yml -n tutorial
kubectl get pods -w -n tutorial
Deploy recommendation service
kubectl apply -f <(istioctl kube-inject -f recommendation/kubernetes/Deployment.yml) -n tutorial
kubectl create -f recommendation/kubernetes/Service.yml -n tutorial
kubectl get pods -w -n tutorial
Testing
curl $GATEWAY_URL/customer
Test loop akses
while true; do sleep 1; curl http://$GATEWAY_URL:32722/customer;done
Kiali dashboard
- Akses pada browser ke http://10.6X.6X.100:20001/kiali
- check pada “Graph”, lalu sesuaikan dengan namespace
- check pada Applications > Namespace: tutorial/bookinfo > customer > inbound Metrics
Conclusion
Kiali.io is an essential tool for developers and operators working with microservices. It provides a comprehensive observability platform that enables users to manage, monitor, and secure their microservices environment more efficiently. By simplifying the management and monitoring of microservices, Kiali.io enables users to focus on developing and deploying new services. With its advanced features and integration capabilities, Kiali.io is a powerful tool that can help users optimize their microservices environment and improve the overall performance of their services.
Our Tagline
#ContinuousLearning