Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

How to enable Istio in Rancher 2.3

2025-01-28 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >

Share

Shulou(Shulou.com)06/01 Report--

In this issue, the editor will bring you about how to enable Istio in Rancher 2.3.The article is rich in content and analyzes and narrates it from a professional point of view. I hope you can get something after reading this article.

After starting the cluster, select Rancher from marketplace to install during the cluster creation process. Civo will start Rancher server and import it into the cluster.

When the cluster is ready, you will see the dashboard of Rancher 2.3, which can support Istio and Kiali. Let's explore this dashboard!

After the cluster is created, you can download kubeconfig and connect to the cluster. Then check to see if Rancher server and cattle-agents are up and running.

Kubectl get nodes NAME STATUS ROLES AGE VERSIONkube-node-79ed Ready worker 96m v1.15.4-k3s.1kube-master-bca5 Ready master 96m v1.15.4-k3s.1kubectlg get pods-n cattle-systemNAME READY STATUS RESTARTS AGEcattle-5669c57dcf-tw65t 1Accord 1 Running 0 3h 37mcattleMurnodeMurray- 8lppr 1/1 Running 0 3h37mcattle-node-agent-g5f6f 1/1 Running 0 3h37mcattle-cluster-agent-587b6d44cf-ppnjd 1/1 Running 0 3h37m

To access Rancher UI, create an ingress,rancher-ingress.yaml as follows:

> > kubectl apply-f rancher-ingress.yamlingress.extensions/cattle-ingress createdkubectl get ingress-n cattle-systemNAME HOSTS ADDRESS PORTS AGEcattle-ingress * 172.31.0.189 80 32s

Now if you visit any node ip, you will see that Rancher server is running.

Create a password and save the URL. Then you should be able to see the imported cluster.

Enable Istio through Rancher UI

The document describes Istio as follows:

Enterprises or organizations that use cloud platforms can experience many benefits from it. But it is undeniable that the adoption of cloud technology will put pressure on the DevOps team. Developers must use micro services to build portability, while operations staff manage very large hybrid cloud and multi-cloud deployments. The service grid makes microservices easier to use, where Istio can help you connect, protect, control, and observe services.

To a large extent, Istio helps reduce the complexity of deployment and lighten the burden on the development team. It is a completely open source service grid that can transparently inject a layer into existing distributed applications. It is also a platform, including a variety of API that can be integrated into any logging platform, telemetry, or policy system. The various functions of Istio enable you to run the distributed micro-service architecture successfully and efficiently, and provide a unified way to protect, connect and monitor micro-services.

So, now let's enable Istio through Rancher UI and deploy it.

To enable Istio, you need to access the menu bar above UI, whose path is tools > Istio. You can change many configuration options. Now, I want to leave all the configurations in the default state and set the ingress gateway to True. Enabling this feature also enables monitoring, which is a prerequisite for the proper operation of Istio.

Once enabled, you will see that monitoring and Istio pod appear under the namespace cattle-prometheus (for monitoring) and istio-system (for istio).

> kubectl get pods-n istio-systemNAME READY STATUS RESTARTS AGEistio-citadel-6bb9c9f6fb-md9f8 1 6m16sistio-galley-67848cd58-g5tbt 1 Running 0 6m16sistio-tracing-64d646945-xm4sm 2 6m15sistio-policy-68959c7999 2 Running 0 6m15sistio-policy-68959c7999-5kmdb 2 Running 1 6m16sistio-galley-67848cd58-g5tbt 1 Running 0 6m16skiali-5f8f876bd5-6djxf 2 Running 0 6m16sistio-telemetry-778bfdcf74-ps9vl 2 Running 2 Running 2 Running 0 6m16sistio-ingressgateway-6f877dd689-rskn4 1 Running 0 6m16sistio-sidecar-injector-69c97ddbb5-x7jcv 1 Running 0 6m16s > > kubectl get pods-n cattle-prometheusNAME READY STATUS RESTARTS AGEprometheus-operator-monitoring-operator-79484b9c6f-zshlq 1 + 1 Running 0 7m42sexporter-node-cluster-monitoring-wnxtc 1 + 1 Running 0 7m39sexporter-node-cluster-monitoring-k68fb 1/1 Running 0 7m39sgrafana-cluster-monitoring-5d676d89c5-vkbzm 2/2 Running 0 7m39sprometheus-cluster-monitoring-0 5/5 Running 1 7m15sexporter-kube-state-cluster-monitoring-5dfd658dc-pn8mt 1/1 Running 0 7m39s

Now, let's take an example of Istio deployment, generate traffic and view it in Kiali dashboard.

We will create deployment, Gateway, and virtual services for the sample application, as follows:

Kubectl label namespace default istio-injection=enablednamespace/default labeledkubectl apply-fservice/details createdserviceaccount/bookinfo-details createddeployment.apps/details-v1 createdservice/ratings createdserviceaccount/bookinfo-ratings createddeployment.apps/ratings-v1 createdservice/reviews createdserviceaccount/bookinfo-reviews createddeployment.apps/reviews-v1 createddeployment.apps/reviews-v2 createddeployment.apps/reviews-v3 createdservice/productpage createdserviceaccount/bookinfo-productpage createddeployment.apps/productpage-v1 createdkubectl apply-f gateway.networking.istio.io/bookinfo-gateway createdkubectl apply-f virtualservice.networking.istio.io/bookinfo created

Generate traffic:

Now that the application is deployed, you can view it through Istio gateway.

> kubectl get podsNAME READY STATUS RESTARTS AGEdetails-v1-74f858558f-m5tsx 2 10mratings-v1 2 Running 0 10mratings-v1-7855f5bcb9-lkhgg 2 Running 0 10mproductpage-v1-8554d58bff-llnqh 2 Running 0 10m | reviews-v2-d6cfdb7d6-rl4zk 2 10mreviews-v3 2 Running 0 10mreviews-v3-75699b5cfb-crdrd 2 Running 0 10mreviews-v1-59fd8b965b-rmct2 2 Running 0 10m > > kubectl get svcNAME TYPE CLUSTER-IP EXTERNAL-IP PORT (S) AGEkubernetes ClusterIP 192.168.128.1 443/TCP 140mdetails ClusterIP 192.168.154.118 9080/TCP 10mratings ClusterIP 192.168.207.69 9080/TCP 10mreviews ClusterIP 192.168.141.42 9080/TCP 10mproductpage ClusterIP 192.168.128.87 9080/TCP 10m

Click on Test users and regular users to generate some traffic.

From the Resources item in the menu bar above UI, select Istio. You can see the following chart:

Click the Kiali icon on the screen.

Kiali

Kiali is the visual console of Istio, which has the function of service grid configuration. It infers the topology to help understand your service grid architecture and provide the health of your grid. In addition, Kiali provides detailed metrics and integrates basic Grafana, so it can be used for advanced queries. Jaeger is also integrated to provide distributed tracking.

You can view the complete topology and process of the deployed application.

Here is a diagram of the applications that have been deployed:

Here are other charts:

Service chart

Versioned application diagram

Workload diagram

Jaeger

Inspired by Dapper and OpenZipkin, Jaeger is designed as an open source distributed tracking system, released by Uber Technologies. It is used to monitor and diagnose distributed systems based on microservices, including:

Distributed context propagation (Distributed Context Propagation)

Distributed transaction monitoring

Root cause analysis (Root cause analysis)

Service dependency analysis

Performance / delay optimization

Jaeger UI

This is how to enable Istio in Rancher 2.3.If you happen to have similar doubts, please refer to the above analysis to understand. If you want to know more about it, you are welcome to follow the industry information channel.

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Servers

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report