Recommandations pour l'exécution d'applications dans OpenShift Service Mesh

 Dans cet article, nous avons rassemblĂ© des trucs et astuces Ă  explorer avant de migrer vos applications vers OpenShift Service Mesh (OSSM). Si vous n'avez jamais rencontrĂ© Service Mesh auparavant, vous pouvez commencer par consulter la page OSSM sur le site Web de Red Hat et dĂ©couvrir comment Istio est implĂ©mentĂ© sur la plate-forme OpenShift .





Lorsque vous commencez Ă  explorer Istio, vous rencontrerez probablement l'application bookinfo , qui est presque universellement utilisĂ©e comme aide visuelle, ou la version plus avancĂ©e de l'application Agence de voyages  . En analysant ces exemples et d'autres, vous pouvez mieux comprendre le fonctionnement du maillage, puis y transfĂ©rer vos applications.





Tout d'abord

Cela vaut la peine de commencer par la documentation officielle d'OpenShift Service Mesh 2.0 (OSSM) , qui contient une tonne de matériaux utiles, notamment:





  • DĂ©crit les diffĂ©rences entre OSSM et le projet open source Istio parent.





  • Description de la façon d' installer OSSM  et





  • Testez-le avec l' exemple d'application bookinfo .





  • Istio  v1.6  ( versions archivĂ©es ).





  • Kiali  v1.24  ( versions archivĂ©es ).





  • Jaeger  1.20 .





mesh-, Istio. release notes , Red Hat OSSM.





, mesh- - Bookinfo. , .





, mesh- – , sidecar’ Envoy pod’ . OSSM .





, , ingress- Bookinfo, , OpenShift, .





, Istio , . , Protocol Selection app and version labels  Pods and Services.





. , sidecar’ Istio, Kiali. , (. ). ? Kiali Istio , , TCP, HTTP.





Il n'y a que des connexions TCP sur le graphe Kiali
Kiali TCP-

Istio , . Istio , (plain) TCP. - , Kubernetes Service . , Protocol Selection.





, , Kubernetes Service. spec -> ports -> name. "name: http" A, B C, HTTP.





Kiali

Kiali – , OpenShift Service Mesh. , , mesh-.





Kiali , Istio, , mesh-. Kiali.





Kiali , , mesh-. Istio , Kiali .





Kiali , FAQ. , :





  •  





  •  





  • sidecar’ 





  • Kiali 





– (label). Istio, Kiali, , , , - Bookinfo, « ».





app version – , , Istio Kiali Jaeger.





Istio , . , . , .





Kiali – , mesh-, , .





Kiali . , , .





Jaeger-

mesh- , , , 50%, , 100%, , . Jaeger Kiali , .





, , sample rate 100% ( : 10000 = 100%). 





ServiceMeshControlPlane ( basic-install) Control Plane ( istio-system) :





spec:
  tracing:
    sampling: 10000 # 100%
      
      



, .





Jaeger , , (trace headers).





, ( ) mesh-. OSSM span’ (trace). , . , span – (, «-»). – , , mesh-, , , , . – – OSSM.





, OSSM span’ ( ) Istio, – . (distributed traces) , , trace- . , . , Envoy-, ( ingress-).





:





  • x-request-id





  • x-b3-traceid





  • x-b3-spanid





  • x-b3-parentspanid





  • x-b3-sampled





  • x-b3-flags





  • x-ot-span-context





Jaeger, OpenTracing API.





trace- Java:





HttpHeaders upstreamHttpHeaders = new HttpHeaders();
if (downstreamHttpHeaders.getHeader(headerName: "x-request-id") != null)
   upstreamHttpHeaders.set("x-request-id", downstreamHttpHeaders.getHeader( headerName: "x-request-id"));
      
      



: .





Kiali YAML





yaml- – , yaml , . , Kiali , .





Istio- Kiali-





, , Kiali, Services.





YAML-





Kiali YAML Istio , .





, Kiali ( ) . , Kiali . , , , . , "node=unknown" Kiali.





/ ( ) TLS , mesh- HTTP . Envoy-.





TLS, Istio Kiali TCP.





, HTTP, HTTPS.





mesh- (. « »).





.





Service Mesh , , - . , :





  • , HTTPS-.





  • .





  • .





  • , mesh- . , -. :





    1. sidecar’ Envoy ( pod’).





    2. sidecar’ sidecar’ Envoy, pod’ .





    3. , sidecar’, , . , , , . .





– () , , mesh-.





Service

, Kubernetes Service, OpenShift Routes.





, OpenShift Routes ( ingress ) . mesh-, / , OpenShift Route Kubernetes Service.





(fallback)

, , -. Envoy- , , , . (fallback), , , Envoy- .





Envoy- , , mesh-.





, mesh-. mesh- , , ? . Service Mesh .





OSSM. , Istio Kiali, TLS origination  egress-.





Istio, :





  1. ( , Mutual TLS).





  2. .





  3. Circuit breaker’.





  4. .





OpenShift Service Mesh , mesh-, , , , . OpenShift, , . – , , , , A/B- .. , OpenShift, . , , .








All Articles