blob: f3005c6b8eb94fb36a51b0f4cfa22fdbe499c28a [file] [log] [blame]
<!doctype html><html lang=en class=no-js><head><meta name=ROBOTS content="INDEX, FOLLOW"><link rel=canonical href=https://cn.dubbo.apache.org/en/overview/tasks/mesh/dubbo-mesh/><script>var _hmt=_hmt||[];(function(){var e,t=document.createElement("script");t.src="https://hm.baidu.com/hm.js?3b78f49ba47181e4d998a66b689446e9",e=document.getElementsByTagName("script")[0],e.parentNode.insertBefore(t,e)})()</script><meta charset=utf-8><meta name=viewport content="width=device-width,initial-scale=1,shrink-to-fit=no"><meta http-equiv=Content-Security-Policy content="frame-src *"><meta name=generator content="Hugo 0.122.0"><link rel="shortcut icon" type=image/png href=/imgs/favicon.png><link rel=apple-touch-icon href=/favicons/apple-touch-icon-180x180.png sizes=180x180><link rel=manifest href=/manifest.webmanifest><title>Dubbo proxy mesh using Envoy & Istio | Apache Dubbo</title><meta property="og:title" content="Dubbo proxy mesh using Envoy & Istio">
<meta property="og:description" content="This example demonstrates how to use Istio+Envoy's Service Mesh deployment mode to develop a Dubbo3 service. The Dubbo3 service uses Triple as the communication protocol. The communication process is intercepted by the Envoy data plane, and Dubbo is managed using the standard Istio traffic management capability."><meta property="og:type" content="article"><meta property="og:url" content="https://cn.dubbo.apache.org/en/overview/tasks/mesh/dubbo-mesh/"><meta property="article:section" content="overview"><meta property="article:modified_time" content="2023-01-02T18:18:49+08:00"><meta itemprop=name content="Dubbo proxy mesh using Envoy & Istio"><meta itemprop=description content="This example demonstrates how to use Istio+Envoy's Service Mesh deployment mode to develop a Dubbo3 service. The Dubbo3 service uses Triple as the communication protocol. The communication process is intercepted by the Envoy data plane, and Dubbo is managed using the standard Istio traffic management capability."><meta itemprop=dateModified content="2023-01-02T18:18:49+08:00"><meta itemprop=wordCount content="1518"><meta itemprop=keywords content><meta name=twitter:card content="summary"><meta name=twitter:title content="Dubbo proxy mesh using Envoy & Istio"><meta name=twitter:description content="This example demonstrates how to use Istio+Envoy's Service Mesh deployment mode to develop a Dubbo3 service. The Dubbo3 service uses Triple as the communication protocol. The communication process is intercepted by the Envoy data plane, and Dubbo is managed using the standard Istio traffic management capability."><script async src="https://www.googletagmanager.com/gtag/js?id=G-NM6FFMT51J"></script><script>var doNotTrack=!1;if(!doNotTrack){window.dataLayer=window.dataLayer||[];function gtag(){dataLayer.push(arguments)}gtag("js",new Date),gtag("config","G-NM6FFMT51J",{anonymize_ip:!1})}</script><link rel=preload href=/scss/main.min.f77e221bcdbe0cadb996060fe82063c747b60c229a1f8bbf0ee529adbadd84fa.css as=style><link href=/scss/main.min.f77e221bcdbe0cadb996060fe82063c747b60c229a1f8bbf0ee529adbadd84fa.css rel=stylesheet integrity><script src=/js/jquery-3.5.1.min.js integrity="sha256-9/aliU8dGd2tb6OSsuzixeV4y/faTqgFtohetphbbj0=" crossorigin=anonymous></script><meta name=theme-color content="#326ce5"><link rel=stylesheet href=/css/feature-states.css><meta name=description content="This example demonstrates how to use Istio+Envoy's Service Mesh deployment mode to develop a Dubbo3 service. The Dubbo3 service uses Triple as the communication protocol. The communication process is intercepted by the Envoy data plane, and Dubbo is managed using the standard Istio traffic management capability."><meta property="og:description" content="This example demonstrates how to use Istio+Envoy's Service Mesh deployment mode to develop a Dubbo3 service. The Dubbo3 service uses Triple as the communication protocol. The communication process is intercepted by the Envoy data plane, and Dubbo is managed using the standard Istio traffic management capability."><meta name=twitter:description content="This example demonstrates how to use Istio+Envoy's Service Mesh deployment mode to develop a Dubbo3 service. The Dubbo3 service uses Triple as the communication protocol. The communication process is intercepted by the Envoy data plane, and Dubbo is managed using the standard Istio traffic management capability."><meta property="og:url" content="https://cn.dubbo.apache.org/en/overview/tasks/mesh/dubbo-mesh/"><meta property="og:title" content="Dubbo proxy mesh using Envoy & Istio"><meta name=twitter:title content="Dubbo proxy mesh using Envoy & Istio"><meta name=twitter:image:alt content="Apache Dubbo"><meta property="og:type" content="article"><meta name=viewport content="width=device-width"><script async defer src=/js/github-buttons.js></script><link href=/css/community.css rel=stylesheet><link href=/css/contactus.css rel=stylesheet><link href=/css/language.css rel=stylesheet><script src=/js/script.js></script></head><body class="td-page td-documentation"><header><nav class="js-navbar-scroll navbar navbar-expand navbar-dark flex-column flex-md-row td-navbar" data-auto-burger=primary><a class=navbar-brand href=/en/><span class=navbar-logo></span><span class="text-uppercase font-weight-bold">Apache Dubbo</span></a><div class="td-navbar-nav-scroll ml-md-auto" id=main_navbar><ul class="navbar-nav mt-2 mt-lg-0"><li class="nav-item mr-4 mb-2 mb-lg-0"><a class="nav-link active" href=/en/overview/><span class=active>Overview</span></a></li><li class="nav-item mr-4 mb-2 mb-lg-0"><a class=nav-link href=/en/docs3-v2/><span>SDK Manual</span></a></li><li class="nav-item mr-4 mb-2 mb-lg-0"><a class=nav-link href=/en/blog/><span>Blog</span></a></li><li class="nav-item mr-4 mb-2 mb-lg-0"><a class=nav-link href=/en/download/><span>Download</span></a></li><li class="nav-item mr-4 mb-2 mb-lg-0"><a class=nav-link href=https://start.dubbo.apache.org/bootstrap.html target=_blank><span>Initializer</span><i class='fas fa-external-link-alt'></i></a></li><li class="nav-item dropdown d-lg-block"><a class="nav-link dropdown-toggle" href=# id=navbarDropdownMenuLink role=button data-toggle=dropdown aria-haspopup=true aria-expanded=false>English</a><div class="dropdown-menu dropdown-menu-right" aria-labelledby=navbarDropdownMenuLink><a class=dropdown-item href=/zh-cn/>中文</a></div></li><li class="nav-item dropdown d-lg-block"><div class="nav-item d-none d-lg-block"></div></li></ul></div></nav><section class="header-hero text-white pb-0 light-text"></section></header><div class="container-fluid td-outer"><div class=td-main><div class="row flex-md-nowrap"><div class="col-12 col-md-3 col-xl-2 td-sidebar d-print-none"><script>$(function(){$("#td-section-nav a").removeClass("active"),$("#td-section-nav #m-enoverviewtasksmeshdubbo-mesh").addClass("active"),$("#td-section-nav #m-enoverviewtasksmeshdubbo-mesh-li span").addClass("td-sidebar-nav-active-item"),$("#td-section-nav #m-enoverviewtasksmeshdubbo-mesh").parents("li").addClass("active-path"),$("#td-section-nav li.active-path").addClass("show"),$("#td-section-nav li.active-path").children("input").prop("checked",!0),$("#td-section-nav #m-enoverviewtasksmeshdubbo-mesh-li").siblings("li").addClass("show"),$("#td-section-nav #m-enoverviewtasksmeshdubbo-mesh-li").children("ul").children("li").addClass("show"),$("#td-sidebar-menu").toggleClass("d-none")})</script><div id=td-sidebar-menu class="td-sidebar__inner d-none"><div id=content-mobile><form class="td-sidebar__search d-flex align-items-center"><button class="btn btn-link td-sidebar__toggle d-md-none p-0 ml-3 fas fa-bars" type=button data-toggle=collapse data-target=#td-section-nav aria-controls=td-docs-nav aria-expanded=false aria-label="Toggle section navigation"></button></form></div><div id=content-desktop></div><nav class="collapse td-sidebar-nav foldable-nav" id=td-section-nav><ul class="td-sidebar-nav__section pr-md-3 ul-0"><li class="td-sidebar-nav__section-title td-sidebar-nav__section with-child" id=m-enoverview-li><ul class=ul-1><li class="td-sidebar-nav__section-title td-sidebar-nav__section with-child" id=m-enoverviewwhat-li><input type=checkbox id=m-enoverviewwhat-check>
<label for=m-enoverviewwhat-check><a href=/en/overview/what/ class="align-left pl-0 td-sidebar-link td-sidebar-link__section" id=m-enoverviewwhat><span>What is Dubbo</span></a></label><ul class="ul-2 foldable"><li class="td-sidebar-nav__section-title td-sidebar-nav__section without-child" id=m-enoverviewwhatoverview-li><input type=checkbox id=m-enoverviewwhatoverview-check>
<label for=m-enoverviewwhatoverview-check><a href=/en/overview/what/overview/ title="Introduction to Dubbo" class="align-left pl-0 td-sidebar-link td-sidebar-link__page" id=m-enoverviewwhatoverview><span>Introduction</span></a></label></li><li class="td-sidebar-nav__section-title td-sidebar-nav__section without-child" id=m-enoverviewwhatdubbo3-li><input type=checkbox id=m-enoverviewwhatdubbo3-check>
<label for=m-enoverviewwhatdubbo3-check><a href=/en/overview/what/dubbo3/ class="align-left pl-0 td-sidebar-link td-sidebar-link__page" id=m-enoverviewwhatdubbo3><span>Dubbo 3 Quick Facts</span></a></label></li><li class="td-sidebar-nav__section-title td-sidebar-nav__section without-child" id=m-enoverviewwhatarchitecture-li><input type=checkbox id=m-enoverviewwhatarchitecture-check>
<label for=m-enoverviewwhatarchitecture-check><a href=/en/overview/what/architecture/ class="align-left pl-0 td-sidebar-link td-sidebar-link__page" id=m-enoverviewwhatarchitecture><span>Architecture</span></a></label></li><li class="td-sidebar-nav__section-title td-sidebar-nav__section without-child" id=m-enoverviewwhatextensibility-li><input type=checkbox id=m-enoverviewwhatextensibility-check>
<label for=m-enoverviewwhatextensibility-check><a href=/en/overview/what/extensibility/ class="align-left pl-0 td-sidebar-link td-sidebar-link__page" id=m-enoverviewwhatextensibility><span>Extensibility</span></a></label></li><li class="td-sidebar-nav__section-title td-sidebar-nav__section without-child" id=m-enoverviewwhatecosystem-li><input type=checkbox id=m-enoverviewwhatecosystem-check>
<label for=m-enoverviewwhatecosystem-check><a href=/en/overview/what/ecosystem/ class="align-left pl-0 td-sidebar-link td-sidebar-link__page" id=m-enoverviewwhatecosystem><span>Ecosystem</span></a></label></li></ul></li><li class="td-sidebar-nav__section-title td-sidebar-nav__section with-child" id=m-enoverviewquickstart-li><input type=checkbox id=m-enoverviewquickstart-check>
<label for=m-enoverviewquickstart-check><a href=/en/overview/quickstart/ class="align-left pl-0 td-sidebar-link td-sidebar-link__section" id=m-enoverviewquickstart><span>Quick Start</span></a></label><ul class="ul-2 foldable"><li class="td-sidebar-nav__section-title td-sidebar-nav__section without-child" id=m-enoverviewquickstartgo-li><input type=checkbox id=m-enoverviewquickstartgo-check>
<label for=m-enoverviewquickstartgo-check><a href=/en/overview/quickstart/go/ title="Quick Start With Golang" class="align-left pl-0 td-sidebar-link td-sidebar-link__page" id=m-enoverviewquickstartgo><span>Quick Start</span></a></label></li><li class="td-sidebar-nav__section-title td-sidebar-nav__section without-child" id=m-enoverviewquickstartrust-li><input type=checkbox id=m-enoverviewquickstartrust-check>
<label for=m-enoverviewquickstartrust-check><a href=/en/overview/quickstart/rust/ title="Quick Start With Rust" class="align-left pl-0 td-sidebar-link td-sidebar-link__page" id=m-enoverviewquickstartrust><span>Quick Start</span></a></label></li></ul></li><li class="td-sidebar-nav__section-title td-sidebar-nav__section with-child" id=m-enoverviewtasks-li><input type=checkbox id=m-enoverviewtasks-check>
<label for=m-enoverviewtasks-check><a href=/en/overview/tasks/ class="align-left pl-0 td-sidebar-link td-sidebar-link__section" id=m-enoverviewtasks><span>Tasks</span></a></label><ul class="ul-2 foldable"><li class="td-sidebar-nav__section-title td-sidebar-nav__section with-child" id=m-enoverviewtaskstraffic-management-li><input type=checkbox id=m-enoverviewtaskstraffic-management-check>
<label for=m-enoverviewtaskstraffic-management-check><a href=/en/overview/tasks/traffic-management/ title="Traffic Management" class="align-left pl-0 td-sidebar-link td-sidebar-link__section" id=m-enoverviewtaskstraffic-management><span>Traffic Governance</span></a></label><ul class="ul-3 foldable"><li class="td-sidebar-nav__section-title td-sidebar-nav__section without-child" id=m-enoverviewtaskstraffic-managementweight-li><input type=checkbox id=m-enoverviewtaskstraffic-managementweight-check>
<label for=m-enoverviewtaskstraffic-managementweight-check><a href=/en/overview/tasks/traffic-management/weight/ class="align-left pl-0 td-sidebar-link td-sidebar-link__page" id=m-enoverviewtaskstraffic-managementweight><span>Adjust traffic distribution by weight</span></a></label></li><li class="td-sidebar-nav__section-title td-sidebar-nav__section without-child" id=m-enoverviewtaskstraffic-managementtimeout-li><input type=checkbox id=m-enoverviewtaskstraffic-managementtimeout-check>
<label for=m-enoverviewtaskstraffic-managementtimeout-check><a href=/en/overview/tasks/traffic-management/timeout/ class="align-left pl-0 td-sidebar-link td-sidebar-link__page" id=m-enoverviewtaskstraffic-managementtimeout><span>Dynamic adjustment of service timeout</span></a></label></li><li class="td-sidebar-nav__section-title td-sidebar-nav__section without-child" id=m-enoverviewtaskstraffic-managementtraffic-routing-li><input type=checkbox id=m-enoverviewtaskstraffic-managementtraffic-routing-check>
<label for=m-enoverviewtaskstraffic-managementtraffic-routing-check><a href=/en/overview/tasks/traffic-management/traffic-routing/ class="align-left pl-0 td-sidebar-link td-sidebar-link__page" id=m-enoverviewtaskstraffic-managementtraffic-routing><span>Request Routing</span></a></label></li><li class="td-sidebar-nav__section-title td-sidebar-nav__section without-child" id=m-enoverviewtaskstraffic-managementzone-li><input type=checkbox id=m-enoverviewtaskstraffic-managementzone-check>
<label for=m-enoverviewtaskstraffic-managementzone-check><a href=/en/overview/tasks/traffic-management/zone/ class="align-left pl-0 td-sidebar-link td-sidebar-link__page" id=m-enoverviewtaskstraffic-managementzone><span>Same computer room/area priority</span></a></label></li><li class="td-sidebar-nav__section-title td-sidebar-nav__section without-child" id=m-enoverviewtaskstraffic-managementisolation-li><input type=checkbox id=m-enoverviewtaskstraffic-managementisolation-check>
<label for=m-enoverviewtaskstraffic-managementisolation-check><a href=/en/overview/tasks/traffic-management/isolation/ class="align-left pl-0 td-sidebar-link td-sidebar-link__page" id=m-enoverviewtaskstraffic-managementisolation><span>Temporarily kick out the problem service instance</span></a></label></li><li class="td-sidebar-nav__section-title td-sidebar-nav__section without-child" id=m-enoverviewtaskstraffic-managementtraffic-gray-li><input type=checkbox id=m-enoverviewtaskstraffic-managementtraffic-gray-check>
<label for=m-enoverviewtaskstraffic-managementtraffic-gray-check><a href=/en/overview/tasks/traffic-management/traffic-gray/ class="align-left pl-0 td-sidebar-link td-sidebar-link__page" id=m-enoverviewtaskstraffic-managementtraffic-gray><span>Traffic Grayscale</span></a></label></li><li class="td-sidebar-nav__section-title td-sidebar-nav__section without-child" id=m-enoverviewtaskstraffic-managementtraffic-condition-li><input type=checkbox id=m-enoverviewtaskstraffic-managementtraffic-condition-check>
<label for=m-enoverviewtaskstraffic-managementtraffic-condition-check><a href=/en/overview/tasks/traffic-management/traffic-condition/ class="align-left pl-0 td-sidebar-link td-sidebar-link__page" id=m-enoverviewtaskstraffic-managementtraffic-condition><span>Traffic Isolation</span></a></label></li></ul></li><li class="td-sidebar-nav__section-title td-sidebar-nav__section with-child" id=m-enoverviewtaskskubernetes-li><input type=checkbox id=m-enoverviewtaskskubernetes-check>
<label for=m-enoverviewtaskskubernetes-check><a href=/en/overview/tasks/kubernetes/ class="align-left pl-0 td-sidebar-link td-sidebar-link__section" id=m-enoverviewtaskskubernetes><span>Kubernetes Deployment Solution</span></a></label><ul class="ul-3 foldable"><li class="td-sidebar-nav__section-title td-sidebar-nav__section without-child" id=m-enoverviewtaskskubernetesdeploy-on-k8s-li><input type=checkbox id=m-enoverviewtaskskubernetesdeploy-on-k8s-check>
<label for=m-enoverviewtaskskubernetesdeploy-on-k8s-check><a href=/en/overview/tasks/kubernetes/deploy-on-k8s/ title="Deploying to Kubernetes" class="align-left pl-0 td-sidebar-link td-sidebar-link__page" id=m-enoverviewtaskskubernetesdeploy-on-k8s><span>Native K8S Service based on API-SERVER</span></a></label></li></ul></li><li class="td-sidebar-nav__section-title td-sidebar-nav__section with-child" id=m-enoverviewtasksmesh-li><input type=checkbox id=m-enoverviewtasksmesh-check>
<label for=m-enoverviewtasksmesh-check><a href=/en/overview/tasks/mesh/ class="align-left pl-0 td-sidebar-link td-sidebar-link__section" id=m-enoverviewtasksmesh><span>Mesh Deployment Solution</span></a></label><ul class="ul-3 foldable"><li class="td-sidebar-nav__section-title td-sidebar-nav__section without-child" id=m-enoverviewtasksmeshdubbo-mesh-li><input type=checkbox id=m-enoverviewtasksmeshdubbo-mesh-check>
<label for=m-enoverviewtasksmeshdubbo-mesh-check><a href=/en/overview/tasks/mesh/dubbo-mesh/ title="Dubbo proxy mesh using Envoy & Istio" class="align-left pl-0 td-sidebar-link td-sidebar-link__page" id=m-enoverviewtasksmeshdubbo-mesh><span>Sidecar mode</span></a></label></li><li class="td-sidebar-nav__section-title td-sidebar-nav__section without-child" id=m-enoverviewtasksmeshproxyless-li><input type=checkbox id=m-enoverviewtasksmeshproxyless-check>
<label for=m-enoverviewtasksmeshproxyless-check><a href=/en/overview/tasks/mesh/proxyless/ title="Istio + Proxyless" class="align-left pl-0 td-sidebar-link td-sidebar-link__page" id=m-enoverviewtasksmeshproxyless><span>Proxyless mode</span></a></label></li></ul></li><li class="td-sidebar-nav__section-title td-sidebar-nav__section with-child" id=m-enoverviewtaskstriple-li><input type=checkbox id=m-enoverviewtaskstriple-check>
<label for=m-enoverviewtaskstriple-check><a href=/en/overview/tasks/triple/ class="align-left pl-0 td-sidebar-link td-sidebar-link__section" id=m-enoverviewtaskstriple><span>Triple Usage Example</span></a></label><ul class="ul-3 foldable"><li class="td-sidebar-nav__section-title td-sidebar-nav__section without-child" id=m-enoverviewtaskstripleidl-li><input type=checkbox id=m-enoverviewtaskstripleidl-check>
<label for=m-enoverviewtaskstripleidl-check><a href=/en/overview/tasks/triple/idl/ class="align-left pl-0 td-sidebar-link td-sidebar-link__page" id=m-enoverviewtaskstripleidl><span>Using IDL + Protobuf to define services across languages</span></a></label></li><li class="td-sidebar-nav__section-title td-sidebar-nav__section without-child" id=m-enoverviewtaskstriplewrap-li><input type=checkbox id=m-enoverviewtaskstriplewrap-check>
<label for=m-enoverviewtaskstriplewrap-check><a href=/en/overview/tasks/triple/wrap/ title="Pojo Serialization Compatibility Mode" class="align-left pl-0 td-sidebar-link td-sidebar-link__page" id=m-enoverviewtaskstriplewrap><span>Pojo serialization compatibility mode</span></a></label></li><li class="td-sidebar-nav__section-title td-sidebar-nav__section without-child" id=m-enoverviewtaskstriplestreaming-li><input type=checkbox id=m-enoverviewtaskstriplestreaming-check>
<label for=m-enoverviewtaskstriplestreaming-check><a href=/en/overview/tasks/triple/streaming/ class="align-left pl-0 td-sidebar-link td-sidebar-link__page" id=m-enoverviewtaskstriplestreaming><span>Streaming communication mode</span></a></label></li></ul></li><li class="td-sidebar-nav__section-title td-sidebar-nav__section with-child" id=m-enoverviewtasksmigration-li><input type=checkbox id=m-enoverviewtasksmigration-check>
<label for=m-enoverviewtasksmigration-check><a href=/en/overview/tasks/migration/ title="How to smoothly migrate to the new functions of Dubbo3" class="align-left pl-0 td-sidebar-link td-sidebar-link__section" id=m-enoverviewtasksmigration><span>Migrate to Dubbo3</span></a></label><ul class="ul-3 foldable"><li class="td-sidebar-nav__section-title td-sidebar-nav__section without-child" id=m-enoverviewtasksmigration2to3-li><input type=checkbox id=m-enoverviewtasksmigration2to3-check>
<label for=m-enoverviewtasksmigration2to3-check><a href=/en/overview/tasks/migration/2to3/ class="align-left pl-0 td-sidebar-link td-sidebar-link__page" id=m-enoverviewtasksmigration2to3><span>Upgrade to Dubbo3</span></a></label></li><li class="td-sidebar-nav__section-title td-sidebar-nav__section without-child" id=m-enoverviewtasksmigrationmigration-triple-li><input type=checkbox id=m-enoverviewtasksmigrationmigration-triple-check>
<label for=m-enoverviewtasksmigrationmigration-triple-check><a href=/en/overview/tasks/migration/migration-triple/ title="Guide to Migrating Dubbo Protocol to Triple Protocol" class="align-left pl-0 td-sidebar-link td-sidebar-link__page" id=m-enoverviewtasksmigrationmigration-triple><span>Triple Protocol</span></a></label></li><li class="td-sidebar-nav__section-title td-sidebar-nav__section without-child" id=m-enoverviewtasksmigrationservice-discovery-samples-li><input type=checkbox id=m-enoverviewtasksmigrationservice-discovery-samples-check>
<label for=m-enoverviewtasksmigrationservice-discovery-samples-check><a href=/en/overview/tasks/migration/service-discovery-samples/ title="Dubbo3 application-level service discovery" class="align-left pl-0 td-sidebar-link td-sidebar-link__page" id=m-enoverviewtasksmigrationservice-discovery-samples><span>Application-Level Service Discovery</span></a></label></li></ul></li><li class="td-sidebar-nav__section-title td-sidebar-nav__section with-child" id=m-enoverviewtasksecosystem-li><input type=checkbox id=m-enoverviewtasksecosystem-check>
<label for=m-enoverviewtasksecosystem-check><a href=/en/overview/tasks/ecosystem/ class="align-left pl-0 td-sidebar-link td-sidebar-link__section" id=m-enoverviewtasksecosystem><span>Microservice Governance</span></a></label><ul class="ul-3 foldable"><li class="td-sidebar-nav__section-title td-sidebar-nav__section without-child" id=m-enoverviewtasksecosystemtransaction-li><input type=checkbox id=m-enoverviewtasksecosystemtransaction-check>
<label for=m-enoverviewtasksecosystemtransaction-check><a href=/en/overview/tasks/ecosystem/transaction/ class="align-left pl-0 td-sidebar-link td-sidebar-link__page" id=m-enoverviewtasksecosystemtransaction><span>Transaction Management</span></a></label></li><li class="td-sidebar-nav__section-title td-sidebar-nav__section without-child" id=m-enoverviewtasksecosystemrate-limit-li><input type=checkbox id=m-enoverviewtasksecosystemrate-limit-check>
<label for=m-enoverviewtasksecosystemrate-limit-check><a href=/en/overview/tasks/ecosystem/rate-limit/ title="Current Limit Downgrade" class="align-left pl-0 td-sidebar-link td-sidebar-link__page" id=m-enoverviewtasksecosystemrate-limit><span>Current limit downgrade</span></a></label></li></ul></li><li class="td-sidebar-nav__section-title td-sidebar-nav__section with-child" id=m-enoverviewtasksextensibility-li><input type=checkbox id=m-enoverviewtasksextensibility-check>
<label for=m-enoverviewtasksextensibility-check><a href=/en/overview/tasks/extensibility/ class="align-left pl-0 td-sidebar-link td-sidebar-link__section" id=m-enoverviewtasksextensibility><span>Custom Extensions</span></a></label><ul class="ul-3 foldable"><li class="td-sidebar-nav__section-title td-sidebar-nav__section without-child" id=m-enoverviewtasksextensibilityprotocol-li><input type=checkbox id=m-enoverviewtasksextensibilityprotocol-check>
<label for=m-enoverviewtasksextensibilityprotocol-check><a href=/en/overview/tasks/extensibility/protocol/ class="align-left pl-0 td-sidebar-link td-sidebar-link__page" id=m-enoverviewtasksextensibilityprotocol><span>Protocol</span></a></label></li><li class="td-sidebar-nav__section-title td-sidebar-nav__section without-child" id=m-enoverviewtasksextensibilityregistry-li><input type=checkbox id=m-enoverviewtasksextensibilityregistry-check>
<label for=m-enoverviewtasksextensibilityregistry-check><a href=/en/overview/tasks/extensibility/registry/ class="align-left pl-0 td-sidebar-link td-sidebar-link__page" id=m-enoverviewtasksextensibilityregistry><span>Registry</span></a></label></li><li class="td-sidebar-nav__section-title td-sidebar-nav__section without-child" id=m-enoverviewtasksextensibilityrouter-li><input type=checkbox id=m-enoverviewtasksextensibilityrouter-check>
<label for=m-enoverviewtasksextensibilityrouter-check><a href=/en/overview/tasks/extensibility/router/ class="align-left pl-0 td-sidebar-link td-sidebar-link__page" id=m-enoverviewtasksextensibilityrouter><span>Router</span></a></label></li><li class="td-sidebar-nav__section-title td-sidebar-nav__section without-child" id=m-enoverviewtasksextensibilityfilter-li><input type=checkbox id=m-enoverviewtasksextensibilityfilter-check>
<label for=m-enoverviewtasksextensibilityfilter-check><a href=/en/overview/tasks/extensibility/filter/ class="align-left pl-0 td-sidebar-link td-sidebar-link__page" id=m-enoverviewtasksextensibilityfilter><span>Custom extension</span></a></label></li></ul></li></ul></li><li class="td-sidebar-nav__section-title td-sidebar-nav__section with-child" id=m-enoverviewmannual-li><input type=checkbox id=m-enoverviewmannual-check>
<label for=m-enoverviewmannual-check><a href=/en/overview/mannual/ class="align-left pl-0 td-sidebar-link td-sidebar-link__section" id=m-enoverviewmannual><span>SDK Manual</span></a></label><ul class="ul-2 foldable"><li class="td-sidebar-nav__section-title td-sidebar-nav__section without-child" id=m-enoverviewmannualjava-li><input type=checkbox id=m-enoverviewmannualjava-check>
<label for=m-enoverviewmannualjava-check><a href=/en/docs3-v2/java-sdk/ title="Java SDK" target=_blank rel=noopener class="align-left pl-0 td-sidebar-link td-sidebar-link__page" id=m-enoverviewmannualjava><span>Java</span></a></label></li><li class="td-sidebar-nav__section-title td-sidebar-nav__section without-child" id=m-enoverviewmannualgolang-li><input type=checkbox id=m-enoverviewmannualgolang-check>
<label for=m-enoverviewmannualgolang-check><a href=/en/docs3-v2/golang-sdk/ title="Golang SDK" target=_blank rel=noopener class="align-left pl-0 td-sidebar-link td-sidebar-link__page" id=m-enoverviewmannualgolang><span>Golang</span></a></label></li><li class="td-sidebar-nav__section-title td-sidebar-nav__section without-child" id=m-enoverviewmannualrust-li><input type=checkbox id=m-enoverviewmannualrust-check>
<label for=m-enoverviewmannualrust-check><a href=/en/docs3-v2/rust-sdk/ title="Rust SDK" target=_blank rel=noopener class="align-left pl-0 td-sidebar-link td-sidebar-link__page" id=m-enoverviewmannualrust><span>Rust</span></a></label></li></ul></li><li class="td-sidebar-nav__section-title td-sidebar-nav__section with-child" id=m-enoverviewcore-features-li><input type=checkbox id=m-enoverviewcore-features-check>
<label for=m-enoverviewcore-features-check><a href=/en/overview/core-features/ title="Core Features" class="align-left pl-0 td-sidebar-link td-sidebar-link__section" id=m-enoverviewcore-features><span>Features</span></a></label><ul class="ul-2 foldable"><li class="td-sidebar-nav__section-title td-sidebar-nav__section without-child" id=m-enoverviewcore-featuresservice-definition-li><input type=checkbox id=m-enoverviewcore-featuresservice-definition-check>
<label for=m-enoverviewcore-featuresservice-definition-check><a href=/en/overview/core-features/service-definition/ title="Develop microservice with Dubbo" class="align-left pl-0 td-sidebar-link td-sidebar-link__page" id=m-enoverviewcore-featuresservice-definition><span>Microservice develop</span></a></label></li><li class="td-sidebar-nav__section-title td-sidebar-nav__section without-child" id=m-enoverviewcore-featuresservice-mesh-li><input type=checkbox id=m-enoverviewcore-featuresservice-mesh-check>
<label for=m-enoverviewcore-featuresservice-mesh-check><a href=/en/overview/core-features/service-mesh/ class="align-left pl-0 td-sidebar-link td-sidebar-link__page" id=m-enoverviewcore-featuresservice-mesh><span>Service Mesh</span></a></label></li><li class="td-sidebar-nav__section-title td-sidebar-nav__section without-child" id=m-enoverviewcore-featuresservice-discovery-li><input type=checkbox id=m-enoverviewcore-featuresservice-discovery-check>
<label for=m-enoverviewcore-featuresservice-discovery-check><a href=/en/overview/core-features/service-discovery/ class="align-left pl-0 td-sidebar-link td-sidebar-link__page" id=m-enoverviewcore-featuresservice-discovery><span>Service Discovery</span></a></label></li><li class="td-sidebar-nav__section-title td-sidebar-nav__section without-child" id=m-enoverviewcore-featuresmore-li><input type=checkbox id=m-enoverviewcore-featuresmore-check>
<label for=m-enoverviewcore-featuresmore-check><a href=/en/overview/core-features/more/ class="align-left pl-0 td-sidebar-link td-sidebar-link__page" id=m-enoverviewcore-featuresmore><span>More Advanced Features</span></a></label></li><li class="td-sidebar-nav__section-title td-sidebar-nav__section without-child" id=m-enoverviewcore-featuresload-balance-li><input type=checkbox id=m-enoverviewcore-featuresload-balance-check>
<label for=m-enoverviewcore-featuresload-balance-check><a href=/en/overview/core-features/load-balance/ class="align-left pl-0 td-sidebar-link td-sidebar-link__page" id=m-enoverviewcore-featuresload-balance><span>Load Balancing</span></a></label></li><li class="td-sidebar-nav__section-title td-sidebar-nav__section with-child" id=m-enoverviewcore-featurestraffic-li><input type=checkbox id=m-enoverviewcore-featurestraffic-check>
<label for=m-enoverviewcore-featurestraffic-check><a href=/en/overview/core-features/traffic/ class="align-left pl-0 td-sidebar-link td-sidebar-link__section" id=m-enoverviewcore-featurestraffic><span>流量管控</span></a></label><ul class="ul-3 foldable"><li class="td-sidebar-nav__section-title td-sidebar-nav__section without-child" id=m-enoverviewcore-featurestrafficcondition-rule-li><input type=checkbox id=m-enoverviewcore-featurestrafficcondition-rule-check>
<label for=m-enoverviewcore-featurestrafficcondition-rule-check><a href=/en/overview/core-features/traffic/condition-rule/ title="Conditional Routing Rules" class="align-left pl-0 td-sidebar-link td-sidebar-link__page" id=m-enoverviewcore-featurestrafficcondition-rule><span>Conditional Routing</span></a></label></li><li class="td-sidebar-nav__section-title td-sidebar-nav__section without-child" id=m-enoverviewcore-featurestraffictag-rule-li><input type=checkbox id=m-enoverviewcore-featurestraffictag-rule-check>
<label for=m-enoverviewcore-featurestraffictag-rule-check><a href=/en/overview/core-features/traffic/tag-rule/ title=标签路由规则 class="align-left pl-0 td-sidebar-link td-sidebar-link__page" id=m-enoverviewcore-featurestraffictag-rule><span>标签路由</span></a></label></li><li class="td-sidebar-nav__section-title td-sidebar-nav__section without-child" id=m-enoverviewcore-featurestrafficscript-rule-li><input type=checkbox id=m-enoverviewcore-featurestrafficscript-rule-check>
<label for=m-enoverviewcore-featurestrafficscript-rule-check><a href=/en/overview/core-features/traffic/script-rule/ title=脚本路由规则 class="align-left pl-0 td-sidebar-link td-sidebar-link__page" id=m-enoverviewcore-featurestrafficscript-rule><span>脚本路由</span></a></label></li><li class="td-sidebar-nav__section-title td-sidebar-nav__section without-child" id=m-enoverviewcore-featurestrafficconfiguration-rule-li><input type=checkbox id=m-enoverviewcore-featurestrafficconfiguration-rule-check>
<label for=m-enoverviewcore-featurestrafficconfiguration-rule-check><a href=/en/overview/core-features/traffic/configuration-rule/ title=动态配置规则 class="align-left pl-0 td-sidebar-link td-sidebar-link__page" id=m-enoverviewcore-featurestrafficconfiguration-rule><span>动态配置</span></a></label></li><li class="td-sidebar-nav__section-title td-sidebar-nav__section without-child" id=m-enoverviewcore-featurestrafficmesh-rule-li><input type=checkbox id=m-enoverviewcore-featurestrafficmesh-rule-check>
<label for=m-enoverviewcore-featurestrafficmesh-rule-check><a href=/en/overview/core-features/traffic/mesh-rule/ title=基于服务网格的路由规则 class="align-left pl-0 td-sidebar-link td-sidebar-link__page" id=m-enoverviewcore-featurestrafficmesh-rule><span>服务网格</span></a></label></li></ul></li><li class="td-sidebar-nav__section-title td-sidebar-nav__section without-child" id=m-enoverviewcore-featuresprotocols-li><input type=checkbox id=m-enoverviewcore-featuresprotocols-check>
<label for=m-enoverviewcore-featuresprotocols-check><a href=/en/overview/core-features/protocols/ class="align-left pl-0 td-sidebar-link td-sidebar-link__page" id=m-enoverviewcore-featuresprotocols><span>Protocols</span></a></label></li><li class="td-sidebar-nav__section-title td-sidebar-nav__section without-child" id=m-enoverviewcore-featuresextensibility-li><input type=checkbox id=m-enoverviewcore-featuresextensibility-check>
<label for=m-enoverviewcore-featuresextensibility-check><a href=/en/overview/core-features/extensibility/ class="align-left pl-0 td-sidebar-link td-sidebar-link__page" id=m-enoverviewcore-featuresextensibility><span>Extensibility Adaptation</span></a></label></li><li class="td-sidebar-nav__section-title td-sidebar-nav__section without-child" id=m-enoverviewcore-featuresobservability-li><input type=checkbox id=m-enoverviewcore-featuresobservability-check>
<label for=m-enoverviewcore-featuresobservability-check><a href=/en/overview/core-features/observability/ class="align-left pl-0 td-sidebar-link td-sidebar-link__page" id=m-enoverviewcore-featuresobservability><span>Observability</span></a></label></li><li class="td-sidebar-nav__section-title td-sidebar-nav__section without-child" id=m-enoverviewcore-featuressecurity-li><input type=checkbox id=m-enoverviewcore-featuressecurity-check>
<label for=m-enoverviewcore-featuressecurity-check><a href=/en/overview/core-features/security/ class="align-left pl-0 td-sidebar-link td-sidebar-link__page" id=m-enoverviewcore-featuressecurity><span>Authentication</span></a></label></li><li class="td-sidebar-nav__section-title td-sidebar-nav__section without-child" id=m-enoverviewcore-featuresecosystem-li><input type=checkbox id=m-enoverviewcore-featuresecosystem-check>
<label for=m-enoverviewcore-featuresecosystem-check><a href=/en/overview/core-features/ecosystem/ class="align-left pl-0 td-sidebar-link td-sidebar-link__page" id=m-enoverviewcore-featuresecosystem><span>Microservices Ecosystem</span></a></label></li></ul></li><li class="td-sidebar-nav__section-title td-sidebar-nav__section with-child" id=m-enoverviewnotices-li><input type=checkbox id=m-enoverviewnotices-check>
<label for=m-enoverviewnotices-check><a href=/en/overview/notices/ class="align-left pl-0 td-sidebar-link td-sidebar-link__section" id=m-enoverviewnotices><span>Security Notice</span></a></label><ul class="ul-2 foldable"><li class="td-sidebar-nav__section-title td-sidebar-nav__section without-child" id=m-enoverviewnoticesserialization-li><input type=checkbox id=m-enoverviewnoticesserialization-check>
<label for=m-enoverviewnoticesserialization-check><a href=/en/overview/notices/serialization/ class="align-left pl-0 td-sidebar-link td-sidebar-link__page" id=m-enoverviewnoticesserialization><span>Serialization Security</span></a></label></li><li class="td-sidebar-nav__section-title td-sidebar-nav__section without-child" id=m-enoverviewnoticesprotocol-li><input type=checkbox id=m-enoverviewnoticesprotocol-check>
<label for=m-enoverviewnoticesprotocol-check><a href=/en/overview/notices/protocol/ title="RPC Protocol Security" class="align-left pl-0 td-sidebar-link td-sidebar-link__page" id=m-enoverviewnoticesprotocol><span>RPC protocol security</span></a></label></li><li class="td-sidebar-nav__section-title td-sidebar-nav__section without-child" id=m-enoverviewnoticesregistry-li><input type=checkbox id=m-enoverviewnoticesregistry-check>
<label for=m-enoverviewnoticesregistry-check><a href=/en/overview/notices/registry/ class="align-left pl-0 td-sidebar-link td-sidebar-link__page" id=m-enoverviewnoticesregistry><span>Registration Center Security</span></a></label></li><li class="td-sidebar-nav__section-title td-sidebar-nav__section without-child" id=m-enoverviewnoticesadmin-li><input type=checkbox id=m-enoverviewnoticesadmin-check>
<label for=m-enoverviewnoticesadmin-check><a href=/en/overview/notices/admin/ class="align-left pl-0 td-sidebar-link td-sidebar-link__page" id=m-enoverviewnoticesadmin><span>Dubbo Admin Security</span></a></label></li><li class="td-sidebar-nav__section-title td-sidebar-nav__section without-child" id=m-enoverviewnoticeslog4j-li><input type=checkbox id=m-enoverviewnoticeslog4j-check>
<label for=m-enoverviewnoticeslog4j-check><a href=/en/overview/notices/log4j/ class="align-left pl-0 td-sidebar-link td-sidebar-link__page" id=m-enoverviewnoticeslog4j><span>Log4j vulnerability impact</span></a></label></li></ul></li></ul></li></ul></nav></div></div><main class="col-12 col-md-9 col-xl-8 pl-md-5" role=main><nav aria-label=breadcrumb class=td-breadcrumbs><ol class=breadcrumb><li class=breadcrumb-item><a href=https://cn.dubbo.apache.org/en/overview/>Overview</a></li><li class=breadcrumb-item><a href=https://cn.dubbo.apache.org/en/overview/tasks/>Tasks</a></li><li class=breadcrumb-item><a href=https://cn.dubbo.apache.org/en/overview/tasks/mesh/>Mesh Deployment Solution</a></li><li class="breadcrumb-item active" aria-current=page><a href=https://cn.dubbo.apache.org/en/overview/tasks/mesh/dubbo-mesh/ aria-disabled=true class="btn-link disabled">Sidecar mode</a></li></ol></nav><div class=td-content><h1>Dubbo proxy mesh using Envoy & Istio</h1><div class=lead>This example demonstrates how to use Istio+Envoy&rsquo;s Service Mesh deployment mode to develop a Dubbo3 service. The Dubbo3 service uses Triple as the communication protocol. The communication process is intercepted by the Envoy data plane, and Dubbo is managed using the standard Istio traffic management capability.</div><header class=article-meta></header><p>By following the steps below, you can easily learn how to develop a Dubbo service that conforms to the Service Mesh architecture, deploy it to Kubernetes, and access Istio&rsquo;s traffic management system. Check here <a href=https://github.com/apache/dubbo-samples/tree/master/3-extensions/registry/dubbo-samples-mesh-k8s>Complete sample source code</a></p><h2 id=1-overall-objective>1 Overall Objective</h2><ul><li>Deploy Dubbo application to Kubernetes</li><li>Istio automatically injects Envoy and implements traffic interception</li><li>Traffic governance based on Istio rules</li></ul><h2 id=2-basic-process-and-working-principle>2 Basic process and working principle</h2><p>This example demonstrates how to deploy an application developed by Dubbo under the Istio system to realize Envoy&rsquo;s automatic proxying of Dubbo services. The overall architecture of the example is shown in the figure below.</p><p><img src=/imgs/v3/mesh/thinsdk-envoy.png alt=thinsdk></p><p>The steps you will need to complete the example are as follows:</p><ol><li>Create a Dubbo application ( <a href=https://github.com/apache/dubbo-samples/tree/master/3-extensions/registry/dubbo-samples-mesh-k8s>dubbo-samples-mesh-k8s</a> )</li><li>Build the container image and push it to the mirror warehouse (<a href=https://hub.docker.com/r/apache/dubbo-demo>the official image of this example</a> )</li><li>Deploy Dubbo Provider and Dubbo Consumer to Kubernetes respectively and verify that Envoy proxy injection is successful</li><li>Verify Envoy discovers the service address, normally intercepts RPC traffic and implements load balancing</li><li>Proportional traffic forwarding based on Istio VirtualService</li></ol><h2 id=3-detailed-steps>3 detailed steps</h2><h3 id=31-environmental-requirements>3.1 Environmental requirements</h3><p>Please ensure that the following environment is installed locally to provide container runtime, Kubernetes cluster and access tools</p><ul><li><a href=https://www.docker.com/get-started/>Docker</a></li><li><a href=https://minikube.sigs.k8s.io/docs/start/>Minikube</a></li><li><a href=https://kubernetes.io/docs/tasks/tools/>Kubectl</a></li><li><a href=https://istio.io/latest/docs/setup/getting-started/>Istio</a></li><li><a href=https://github.com/ahmetb/kubectx>Kubens(optional)</a></li></ul><p>Start the local Kubernetes cluster with the following command</p><div class=highlight><pre tabindex=0 style=color:#93a1a1;background-color:#002b36;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-shell data-lang=shell><span style=display:flex><span>minikube start
</span></span></code></pre></div><p>Check that the cluster is up and running with kubectl, and that kubectl is bound to the default local cluster</p><div class=highlight><pre tabindex=0 style=color:#93a1a1;background-color:#002b36;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-shell data-lang=shell><span style=display:flex><span>kubectl cluster-info
</span></span></code></pre></div><h3 id=32-create-an-independent-namespace-and-enable-automatic-injection>3.2 Create an independent namespace and enable automatic injection</h3><p>Use the following command to create an independent Namespace <code>dubbo-demo</code> for the sample project, and enable sidecar automatic injection at the same time.</p><div class=highlight><pre tabindex=0 style=color:#93a1a1;background-color:#002b36;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-shell data-lang=shell><span style=display:flex><span><span style=color:#586e75># Initialize the namespace</span>
</span></span><span style=display:flex><span>kubectl apply -f https://raw.githubusercontent.com/apache/dubbo-samples/master/3-extensions/registry/dubbo-samples-mesh-k8s/deploy/Namespace.yml
</span></span><span style=display:flex><span>
</span></span><span style=display:flex><span><span style=color:#586e75># switch namespace</span>
</span></span><span style=display:flex><span>kubens dubbo-demo
</span></span><span style=display:flex><span>
</span></span><span style=display:flex><span><span style=color:#586e75># dubbo-demo enable automatic injection</span>
</span></span><span style=display:flex><span>kubectl label namespace dubbo-demo istio-injection<span style=color:#719e07>=</span>enabled
</span></span></code></pre></div><h3 id=33-deploy-to-kubernetes>3.3 Deploy to Kubernetes</h3><h4 id=331-deploy-provider>3.3.1 Deploy Provider</h4><div class=highlight><pre tabindex=0 style=color:#93a1a1;background-color:#002b36;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-shell data-lang=shell><span style=display:flex><span><span style=color:#586e75># Deploy the Service</span>
</span></span><span style=display:flex><span>kubectl apply -f https://raw.githubusercontent.com/apache/dubbo-samples/master/3-extensions/registry/dubbo-samples-mesh-k8s/deploy/provider/Service.yml
</span></span><span style=display:flex><span>
</span></span><span style=display:flex><span><span style=color:#586e75># Deploy Deployment</span>
</span></span><span style=display:flex><span>kubectl apply -f https://raw.githubusercontent.com/apache/dubbo-samples/master/3-extensions/registry/dubbo-samples-mesh-k8s/deploy/provider/Deployment.yml
</span></span></code></pre></div><p>The above command creates a Service named <code>dubbo-samples-mesh-provider</code>, note that the service name here is the same as the dubbo application name in the project.</p><p>Then the Deployment deploys a 2-copy pod instance, and the Provider is started.</p><p>You can check the startup log with the following command.</p><div class=highlight><pre tabindex=0 style=color:#93a1a1;background-color:#002b36;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-shell data-lang=shell><span style=display:flex><span><span style=color:#586e75># View pod list</span>
</span></span><span style=display:flex><span>kubectl get pods -l <span style=color:#268bd2>app</span><span style=color:#719e07>=</span>dubbo-samples-mesh-provider
</span></span><span style=display:flex><span>
</span></span><span style=display:flex><span><span style=color:#586e75># View pod deployment logs</span>
</span></span><span style=display:flex><span>kubectl logs your-pod-id
</span></span></code></pre></div><p>At this time, there should be a dubbo provider container instance and an Envoy Sidecar container instance in the pod.</p><h4 id=332-deploy-consumer>3.3.2 Deploy Consumer</h4><div class=highlight><pre tabindex=0 style=color:#93a1a1;background-color:#002b36;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-shell data-lang=shell><span style=display:flex><span><span style=color:#586e75># Deploy the Service</span>
</span></span><span style=display:flex><span>kubectl apply -f https://raw.githubusercontent.com/apache/dubbo-samples/master/3-extensions/registry/dubbo-samples-mesh-k8s/deploy/consumer/Service.yml
</span></span><span style=display:flex><span>
</span></span><span style=display:flex><span><span style=color:#586e75># Deploy Deployment</span>
</span></span><span style=display:flex><span>kubectl apply -f https://raw.githubusercontent.com/apache/dubbo-samples/master/3-extensions/registry/dubbo-samples-mesh-k8s/deploy/consumer/Deployment.yml
</span></span></code></pre></div><p>Deploying consumer and provider is the same, here also keep K8S Service and Dubbo consumer application name (in [dubbo.properties](<a href=https://github.com/apache/dubbo-samples/blob/master/3-extensions/registry>https://github.com/apache/dubbo-samples/blob/master/3-extensions/registry</a> //dubbo-samples-mesh-k8s/dubbo-samples-mesh-consumer/src/main/resources/spring/dubbo-consumer.properties) consistent: <code>dubbo.application.name=dubbo-samples-mesh- consumer</code>.</p><blockquote><p>The provider service (application) name of consumption is also specified in the Dubbo Consumer service statement <code>@DubboReference(version = "1.0.0", providedBy = "dubbo-samples-mesh-provider", lazy = true)</code></p></blockquote><h3 id=34-check-the-normal-communication-between-provider-and-consumer>3.4 Check the normal communication between Provider and Consumer</h3><p>After performing step 3.3, check the startup log to see that the consumer has completed consumption of the provider service.</p><div class=highlight><pre tabindex=0 style=color:#93a1a1;background-color:#002b36;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-shell data-lang=shell><span style=display:flex><span><span style=color:#586e75># View pod list</span>
</span></span><span style=display:flex><span>kubectl get pods -l <span style=color:#268bd2>app</span><span style=color:#719e07>=</span>dubbo-samples-mesh-consumer
</span></span><span style=display:flex><span>
</span></span><span style=display:flex><span><span style=color:#586e75># View pod deployment logs</span>
</span></span><span style=display:flex><span>kubectl logs your-pod-id
</span></span><span style=display:flex><span>
</span></span><span style=display:flex><span><span style=color:#586e75># View pod isitio-proxy logs</span>
</span></span><span style=display:flex><span>kubectl logs your-pod-id -c istio-proxy
</span></span></code></pre></div><p>You can see that the consumer pod log output is as follows (the Triple protocol is load balanced by the Envoy proxy):</p><div class=highlight><pre tabindex=0 style=color:#93a1a1;background-color:#002b36;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-bash data-lang=bash><span style=display:flex><span><span style=color:#719e07>=====================</span> dubbo invoke <span style=color:#2aa198>0</span> <span style=color:#268bd2>end</span> <span style=color:#719e07>======================</span>
</span></span><span style=display:flex><span><span style=color:#719e07>[</span>10/08/22 07:07:36:036 UTC<span style=color:#719e07>]</span> main INFO action.GreetingServiceConsumer: consumer Unary reply &lt;-message: <span style=color:#2aa198>&#34;hello, service mesh, response from provider-v1: 172.18.96.22:50052, client: 172.18. 96.22, local: dubbo-samples-mesh-provider, remote: null, isProviderSide: true&#34;</span>
</span></span><span style=display:flex><span>
</span></span><span style=display:flex><span><span style=color:#719e07>=====================</span> dubbo invoke <span style=color:#2aa198>1</span> <span style=color:#268bd2>end</span> <span style=color:#719e07>======================</span>
</span></span><span style=display:flex><span><span style=color:#719e07>[</span>10/08/22 07:07:42:042 UTC<span style=color:#719e07>]</span> main INFO action.GreetingServiceConsumer: consumer Unary reply &lt;-message: <span style=color:#2aa198>&#34;hello, service mesh, response from provider-v1: 172.18.96.18:50052, client: 172.18. 96.18, local: dubbo-samples-mesh-provider, remote: null, isProviderSide: true&#34;</span>
</span></span></code></pre></div><p>The consumer istio-proxy log output is as follows:</p><div class=highlight><pre tabindex=0 style=color:#93a1a1;background-color:#002b36;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-shell data-lang=shell><span style=display:flex><span><span style=color:#719e07>[</span>2022-07-15T05:35:14.418Z<span style=color:#719e07>]</span> <span style=color:#2aa198>&#34;POST /org.apache.dubbo.samples.Greeter/greet HTTP/2&#34;</span> <span style=color:#2aa198>200</span>
</span></span><span style=display:flex><span>- via_upstream - <span style=color:#2aa198>&#34;-&#34;</span> <span style=color:#2aa198>19</span> <span style=color:#2aa198>160</span> <span style=color:#2aa198>2</span> <span style=color:#2aa198>1</span> <span style=color:#2aa198>&#34;-&#34;</span> <span style=color:#2aa198>&#34;-&#34;</span> <span style=color:#2aa198>&#34;6b8a5a03-5783-98bf-9bee-f93ea6e3d68e&#34;</span>
</span></span><span style=display:flex><span><span style=color:#2aa198>&#34;dubbo-samples-mesh-provider:50052&#34;</span> <span style=color:#2aa198>&#34;172.17.0.4:50052&#34;</span>
</span></span><span style=display:flex><span>outbound|50052<span style=color:#719e07>||</span>dubbo-samples-mesh-provider.dubbo-demo.svc.cluster.local 172.17.0.7:52768 10.101.172.129:50052 172.17.0.7:38488 - default
</span></span></code></pre></div><p>You can see the provider pod log output as follows:</p><div class=highlight><pre tabindex=0 style=color:#93a1a1;background-color:#002b36;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-shell data-lang=shell><span style=display:flex><span><span style=color:#719e07>[</span>10/08/22 07:08:47:047 UTC<span style=color:#719e07>]</span> tri-protocol-50052-thread-8 INFO impl.GreeterImpl: Server <span style=color:#b58900>test</span> dubbo tri mesh received greet request name: <span style=color:#2aa198>&#34;service mesh&#34;</span>
</span></span><span style=display:flex><span>
</span></span><span style=display:flex><span><span style=color:#719e07>[</span>10/08/22 07:08:57:057 UTC<span style=color:#719e07>]</span> tri-protocol-50052-thread-9 INFO impl.GreeterImpl: Server <span style=color:#b58900>test</span> dubbo tri mesh received greet request name: <span style=color:#2aa198>&#34;service mesh&#34;</span>
</span></span></code></pre></div><p>The log output of provider istio-proxy is as follows:</p><div class=highlight><pre tabindex=0 style=color:#93a1a1;background-color:#002b36;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-shell data-lang=shell><span style=display:flex><span><span style=color:#719e07>[</span>2022-07-15T05:25:34.061Z<span style=color:#719e07>]</span> <span style=color:#2aa198>&#34;POST /org.apache.dubbo.samples.Greeter/greet HTTP/2&#34;</span> <span style=color:#2aa198>200</span>
</span></span><span style=display:flex><span>- via_upstream - <span style=color:#2aa198>&#34;-&#34;</span> <span style=color:#2aa198>19</span> <span style=color:#2aa198>162</span> <span style=color:#2aa198>1</span> <span style=color:#2aa198>1</span> <span style=color:#2aa198>&#34;-&#34;</span> <span style=color:#2aa198>&#34;-&#34;</span> <span style=color:#2aa198>&#34;201e6976-da10-96e1-8da7-ad032e58db47&#34;</span>
</span></span><span style=display:flex><span><span style=color:#2aa198>&#34;dubbo-samples-mesh-provider:50052&#34;</span> <span style=color:#2aa198>&#34;172.17.0.10:50052&#34;</span>
</span></span><span style=display:flex><span> inbound|50052<span style=color:#719e07>||</span> 127.0.0.6:47013 172.17.0.10:50052 172.17.0.7:60244
</span></span><span style=display:flex><span> outbound_.50052_._.dubbo-samples-mesh-provider.dubbo-demo.svc.cluster.local default
</span></span></code></pre></div><h3 id=35-traffic-governance---virtualservice-implements-proportional-traffic-forwarding>3.5 Traffic Governance - VirtualService implements proportional traffic forwarding</h3><p>Deploy the v2 version of the demo provider</p><div class=highlight><pre tabindex=0 style=color:#93a1a1;background-color:#002b36;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-shell data-lang=shell><span style=display:flex><span>kubectl apply -f https://raw.githubusercontent.com/apache/dubbo-samples/master/3-extensions/registry/dubbo-samples-mesh-k8s/deploy/provider/Deployment-v2.yml
</span></span></code></pre></div><p>Set VirtualService and DestinationRule, and observe that traffic is directed to provider v1 and provider v2 respectively in a ratio of 4:1.</p><div class=highlight><pre tabindex=0 style=color:#93a1a1;background-color:#002b36;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-shell data-lang=shell><span style=display:flex><span>kubectl apply -f https://raw.githubusercontent.com/apache/dubbo-samples/master/3-extensions/registry/dubbo-samples-mesh-k8s/deploy/traffic/virtual-service.yml
</span></span></code></pre></div><p>From the log output of the consumer side, observe the traffic distribution effect as shown in the figure below:</p><div class=highlight><pre tabindex=0 style=color:#93a1a1;background-color:#002b36;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-java data-lang=java><span style=display:flex><span><span style=color:#719e07>=====================</span> dubbo invoke 100 end <span style=color:#719e07>======================</span>
</span></span><span style=display:flex><span><span style=color:#719e07>[</span>10<span style=color:#719e07>/</span>08<span style=color:#719e07>/</span>22 07:15:58:058 UTC<span style=color:#719e07>]</span> main INFO action.GreetingServiceConsumer: consumer Unary reply <span style=color:#719e07>&lt;-</span>message: <span style=color:#2aa198>&#34;hello, service mesh, response from provider-v1: 172.18.96.18:50052, client: 172.18. 96.18, local: dubbo-samples-mesh-provider, remote: null, isProviderSide: true&#34;</span>
</span></span><span style=display:flex><span>
</span></span><span style=display:flex><span><span style=color:#719e07>=====================</span> dubbo invoke 101 end <span style=color:#719e07>======================</span>
</span></span><span style=display:flex><span><span style=color:#719e07>[</span>10<span style=color:#719e07>/</span>08<span style=color:#719e07>/</span>22 07:16:03:003 UTC<span style=color:#719e07>]</span> main INFO action.GreetingServiceConsumer: consumer Unary reply <span style=color:#719e07>&lt;-</span>message: <span style=color:#2aa198>&#34;hello, service mesh, response from provider-v1: 172.18.96.22:50052, client: 172.18. 96.22, local: dubbo-samples-mesh-provider, remote: null, isProviderSide: true&#34;</span>
</span></span><span style=display:flex><span>
</span></span><span style=display:flex><span><span style=color:#719e07>=====================</span> dubbo invoke 102 end <span style=color:#719e07>======================</span>
</span></span><span style=display:flex><span><span style=color:#719e07>[</span>10<span style=color:#719e07>/</span>08<span style=color:#719e07>/</span>22 07:16:08:008 UTC<span style=color:#719e07>]</span> main INFO action.GreetingServiceConsumer: consumer Unary reply <span style=color:#719e07>&lt;-</span>message: <span style=color:#2aa198>&#34;hello, service mesh, response from provider-v1: 172.18.96.18:50052, client: 172.18. 96.18, local: dubbo-samples-mesh-provider, remote: null, isProviderSide: true&#34;</span>
</span></span><span style=display:flex><span>
</span></span><span style=display:flex><span><span style=color:#719e07>=====================</span> dubbo invoke 103 end <span style=color:#719e07>======================</span>
</span></span><span style=display:flex><span><span style=color:#719e07>[</span>10<span style=color:#719e07>/</span>08<span style=color:#719e07>/</span>22 07:16:13:013 UTC<span style=color:#719e07>]</span> main INFO action.GreetingServiceConsumer: consumer Unary reply <span style=color:#719e07>&lt;-</span>message: <span style=color:#2aa198>&#34;hello, service mesh, response from provider-v2: 172.18.96.6:50052, client: 172.18. 96.6, local: dubbo-samples-mesh-provider, remote: null, isProviderSide: true&#34;</span>
</span></span><span style=display:flex><span>
</span></span><span style=display:flex><span><span style=color:#719e07>=====================</span> dubbo invoke 104 end <span style=color:#719e07>======================</span>
</span></span><span style=display:flex><span><span style=color:#719e07>[</span>10<span style=color:#719e07>/</span>08<span style=color:#719e07>/</span>22 07:16:18:018 UTC<span style=color:#719e07>]</span> main INFO action.GreetingServiceConsumer: consumer Unary reply <span style=color:#719e07>&lt;-</span>message: <span style=color:#2aa198>&#34;hello, service mesh, response from provider-v1: 172.18.96.22:50052, client: 172.18. 96.22, local: dubbo-samples-mesh-provider, remote: null, isProviderSide: true&#34;</span>
</span></span><span style=display:flex><span>
</span></span><span style=display:flex><span><span style=color:#719e07>=====================</span> dubbo invoke 105 end <span style=color:#719e07>======================</span>
</span></span><span style=display:flex><span><span style=color:#719e07>[</span>10<span style=color:#719e07>/</span>08<span style=color:#719e07>/</span>22 07:16:24:024 UTC<span style=color:#719e07>]</span> main INFO action.GreetingServiceConsumer: consumer Unary reply <span style=color:#719e07>&lt;-</span>message: <span style=color:#2aa198>&#34;hello, service mesh, response from provider-v1: 172.18.96.18:50052, client: 172.18. 96.18, local: dubbo-samples-mesh-provider, remote: null, isProviderSide: true&#34;</span>
</span></span><span style=display:flex><span>
</span></span><span style=display:flex><span><span style=color:#719e07>=====================</span> dubbo invoke 106 end <span style=color:#719e07>======================</span>
</span></span><span style=display:flex><span><span style=color:#719e07>[</span>10<span style=color:#719e07>/</span>08<span style=color:#719e07>/</span>22 07:16:29:029 UTC<span style=color:#719e07>]</span> main INFO action.GreetingServiceConsumer: consumer Unary reply <span style=color:#719e07>&lt;-</span>message: <span style=color:#2aa198>&#34;hello, service mesh, response from provider-v1: 172.18.96.22:50052, client: 172.18. 96.22, local: dubbo-samples-mesh-provider, remote: null, isProviderSide: true&#34;</span>
</span></span><span style=display:flex><span>
</span></span><span style=display:flex><span><span style=color:#719e07>=====================</span> dubbo invoke 107 end <span style=color:#719e07>======================</span>
</span></span><span style=display:flex><span><span style=color:#719e07>[</span>10<span style=color:#719e07>/</span>08<span style=color:#719e07>/</span>22 07:16:34:034 UTC<span style=color:#719e07>]</span> main INFO action.GreetingServiceConsumer: consumer Unary reply <span style=color:#719e07>&lt;-</span>message: <span style=color:#2aa198>&#34;hello, service mesh, response from provider-v1: 172.18.96.18:50052, client: 172.18. 96.18, local: dubbo-samples-mesh-provider, remote: null, isProviderSide: true&#34;</span>
</span></span><span style=display:flex><span>
</span></span><span style=display:flex><span><span style=color:#719e07>=====================</span> dubbo invoke 108 end <span style=color:#719e07>======================</span>
</span></span><span style=display:flex><span><span style=color:#719e07>[</span>10<span style=color:#719e07>/</span>08<span style=color:#719e07>/</span>22 07:16:39:039 UTC<span style=color:#719e07>]</span> main INFO action.GreetingServiceConsumer: consumer Unary reply <span style=color:#719e07>&lt;-</span>message: <span style=color:#2aa198>&#34;hello, service mesh, response from provider-v1: 172.18.96.22:50052, client: 172.18. 96.22, local: dubbo-samples-mesh-provider, remote: null, isProviderSide: true&#34;</span>
</span></span><span style=display:flex><span>
</span></span><span style=display:flex><span><span style=color:#719e07>=====================</span> dubbo invoke 109 end <span style=color:#719e07>======================</span>
</span></span><span style=display:flex><span><span style=color:#719e07>[</span>10<span style=color:#719e07>/</span>08<span style=color:#719e07>/</span>22 07:16:44:044 UTC<span style=color:#719e07>]</span> main INFO action.GreetingServiceConsumer: consumer Unary reply <span style=color:#719e07>&lt;-</span>message: <span style=color:#2aa198>&#34;hello, service mesh, response from provider-v1: 172.18.96.18:50052, client: 172.18. 96.18, local: dubbo-samples-mesh-provider, remote: null, isProviderSide: true&#34;</span>
</span></span></code></pre></div><h3 id=36-view-dashboard>3.6 View dashboard</h3><p>See <a href=https://istio.io/latest/docs/setup/getting-started/#dashboard>How to start the dashboard</a> on the Istio official website.</p><h2 id=4-modified-example>4 Modified Example</h2><blockquote><ol><li>Modifying the example is not a necessary step, this section is for readers who want to adjust the code and see the deployment effect.</li><li>Note that the project source code storage path must be in English, otherwise protobuf compilation will fail.</li></ol></blockquote><p>Modify Dubbo Provider configuration <code>dubbo-provider.properties</code></p><div class=highlight><pre tabindex=0 style=color:#93a1a1;background-color:#002b36;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-properties data-lang=properties><span style=display:flex><span><span style=color:#586e75># provider</span>
</span></span><span style=display:flex><span>dubbo.application.name<span style=color:#719e07>=</span><span style=color:#2aa198>dubbo-samples-mesh-provider</span>
</span></span><span style=display:flex><span>dubbo.application.metadataServicePort<span style=color:#719e07>=</span><span style=color:#2aa198>20885</span>
</span></span><span style=display:flex><span>dubbo.registry.address<span style=color:#719e07>=</span><span style=color:#2aa198>N/A</span>
</span></span><span style=display:flex><span>dubbo.protocol.name<span style=color:#719e07>=</span><span style=color:#2aa198>tri</span>
</span></span><span style=display:flex><span>dubbo.protocol.port<span style=color:#719e07>=</span><span style=color:#2aa198>50052</span>
</span></span><span style=display:flex><span>dubbo.application.qosEnable<span style=color:#719e07>=</span><span style=color:#2aa198>true</span>
</span></span><span style=display:flex><span><span style=color:#586e75># In order for the Kubernetes cluster to access the probe normally, it is necessary to enable QOS to allow remote access, which may bring security Risk, please carefully evaluate before opening</span>
</span></span><span style=display:flex><span>dubbo.application.qosAcceptForeignIp<span style=color:#719e07>=</span><span style=color:#2aa198>true</span>
</span></span></code></pre></div><p>Modify Dubbo Consumer configuration <code>dubbo-consumer.properties</code></p><div class=highlight><pre tabindex=0 style=color:#93a1a1;background-color:#002b36;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-properties data-lang=properties><span style=display:flex><span><span style=color:#586e75># consumer</span>
</span></span><span style=display:flex><span>dubbo.application.name<span style=color:#719e07>=</span><span style=color:#2aa198>dubbo-samples-mesh-consumer</span>
</span></span><span style=display:flex><span>dubbo.application.metadataServicePort<span style=color:#719e07>=</span><span style=color:#2aa198>20885</span>
</span></span><span style=display:flex><span>dubbo.registry.address<span style=color:#719e07>=</span><span style=color:#2aa198>N/A</span>
</span></span><span style=display:flex><span>dubbo.protocol.name<span style=color:#719e07>=</span><span style=color:#2aa198>tri</span>
</span></span><span style=display:flex><span>dubbo.protocol.port<span style=color:#719e07>=</span><span style=color:#2aa198>20880</span>
</span></span><span style=display:flex><span>dubbo.consumer.timeout<span style=color:#719e07>=</span><span style=color:#2aa198>30000</span>
</span></span><span style=display:flex><span>dubbo.application.qosEnable<span style=color:#719e07>=</span><span style=color:#2aa198>true</span>
</span></span><span style=display:flex><span><span style=color:#586e75># In order for the Kubernetes cluster to access the probe normally, it is necessary to enable QOS to allow remote access. This operation may bring security risks. Please evaluate it carefully before opening it</span>
</span></span><span style=display:flex><span>dubbo.application.qosAcceptForeignIp<span style=color:#719e07>=</span><span style=color:#2aa198>true</span>
</span></span><span style=display:flex><span><span style=color:#586e75># Flag to enable mesh sidecar proxy mode</span>
</span></span><span style=display:flex><span>dubbo.consumer.meshEnable<span style=color:#719e07>=</span><span style=color:#2aa198>true</span>
</span></span></code></pre></div><p>After completing the code modification, package the image through the Dockerfile provided by the project</p><div class=highlight><pre tabindex=0 style=color:#93a1a1;background-color:#002b36;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-shell data-lang=shell><span style=display:flex><span><span style=color:#586e75># Package and push the image</span>
</span></span><span style=display:flex><span>mvn compile jib:build
</span></span></code></pre></div><blockquote><p>The Jib plugin will automatically package and publish the image. Note that for local development, you need to change the docker registry organization apache/dubbo-demo in the jib plug-in configuration to an organization with your own authority (including dubboteam in other kubernetes manifests to ensure that kubernetes deploys your own customized image) , if you encounter jib plug-in authentication problems, please refer to [corresponding link](<a href=https://github.com/GoogleContainerTools/jib/blob/master/docs/faq.md#what-should-i-do-when-the->https://github.com/GoogleContainerTools/jib/blob/master/docs/faq.md#what-should-i-do-when-the-</a> registry-responds-with-unauthorized) to configure docker registry authentication information.
You can specify <code>mvn compile jib:build -Djib.to.auth.username=x -Djib.to.auth.password=x -Djib.from.auth.username=x -Djib.from.auth directly on the command line .username=x</code>, or use docker-credential-helper.</p></blockquote><h2 id=5-common-commands>5 Common commands</h2><div class=highlight><pre tabindex=0 style=color:#93a1a1;background-color:#002b36;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-shell data-lang=shell><span style=display:flex><span><span style=color:#586e75># dump current Envoy configs</span>
</span></span><span style=display:flex><span>kubectl <span style=color:#b58900>exec</span> -it <span style=color:#2aa198>${</span><span style=color:#268bd2>your</span> pod id<span style=color:#2aa198>}</span> -c istio-proxy curl http://127.0.0.1:15000/config_dump &gt; config_dump
</span></span><span style=display:flex><span>
</span></span><span style=display:flex><span><span style=color:#586e75># Enter the istio-proxy container</span>
</span></span><span style=display:flex><span>kubectl <span style=color:#b58900>exec</span> -it <span style=color:#2aa198>${</span><span style=color:#268bd2>your</span> pod id<span style=color:#2aa198>}</span> -c istio-proxy -- /bin/bash
</span></span><span style=display:flex><span>
</span></span><span style=display:flex><span><span style=color:#586e75># View container logs</span>
</span></span><span style=display:flex><span>kubectl logs <span style=color:#2aa198>${</span><span style=color:#268bd2>your</span> pod id<span style=color:#2aa198>}</span> -n <span style=color:#2aa198>${</span><span style=color:#268bd2>your</span> namespace<span style=color:#2aa198>}</span>
</span></span><span style=display:flex><span>
</span></span><span style=display:flex><span>kubectl logs <span style=color:#2aa198>${</span><span style=color:#268bd2>your</span> pod id<span style=color:#2aa198>}</span> -n <span style=color:#2aa198>${</span><span style=color:#268bd2>your</span> namespace<span style=color:#2aa198>}</span> -c istio-proxy
</span></span><span style=display:flex><span>
</span></span><span style=display:flex><span><span style=color:#586e75># Enable automatic sidecar injection</span>
</span></span><span style=display:flex><span>kubectl label namespace <span style=color:#2aa198>${</span><span style=color:#268bd2>your</span> namespace<span style=color:#2aa198>}</span> istio-injection<span style=color:#719e07>=</span>enabled --overwrite
</span></span><span style=display:flex><span>
</span></span><span style=display:flex><span><span style=color:#586e75># Turn off automatic sidecar injection</span>
</span></span><span style=display:flex><span>kubectl label namespace <span style=color:#2aa198>${</span><span style=color:#268bd2>your</span> namespace<span style=color:#2aa198>}</span> istio-injection<span style=color:#719e07>=</span>disabled --overwrite
</span></span></code></pre></div><h2 id=6-notes>6 Notes</h2><ol><li>In the example, both the producer and the consumer belong to the same namespace; if you need to call a provider of a different namespace, you need to configure it as follows (<strong>dubbo version>=3.1.2</strong>):</li></ol><p>Annotation method:</p><div class=highlight><pre tabindex=0 style=color:#93a1a1;background-color:#002b36;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-java data-lang=java><span style=display:flex><span> <span style=color:#268bd2>@DubboReference</span>(providedBy <span style=color:#719e07>=</span> <span style=color:#2aa198>&#34;istio-demo-dubbo-producer&#34;</span>, providerPort <span style=color:#719e07>=</span> 20885, providerNamespace <span style=color:#719e07>=</span> <span style=color:#2aa198>&#34;istio-demo&#34;</span>)
</span></span></code></pre></div><p>xml way</p><div class=highlight><pre tabindex=0 style=color:#93a1a1;background-color:#002b36;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-xml data-lang=xml><span style=display:flex><span><span style=color:#268bd2>&lt;dubbo:reference</span> id=<span style=color:#2aa198>&#34;demoService&#34;</span> check=<span style=color:#2aa198>&#34;true&#34;</span>
</span></span><span style=display:flex><span> interface=<span style=color:#2aa198>&#34;org.apache.dubbo.samples.basic.api.DemoService&#34;</span>
</span></span><span style=display:flex><span> provider-port=<span style=color:#2aa198>&#34;20885&#34;</span>
</span></span><span style=display:flex><span> provided-by=<span style=color:#2aa198>&#34;istio-dubbo-producer&#34;</span>
</span></span><span style=display:flex><span> provider-namespace=<span style=color:#2aa198>&#34;istio-demo&#34;</span><span style=color:#268bd2>/&gt;</span>
</span></span></code></pre></div><div id=pre-footer><h2>Feedback</h2><p class=feedback--prompt>Was this page helpful?</p><button class="btn btn-primary mb-4 feedback--yes">Yes</button>
<button class="btn btn-primary mb-4 feedback--no">No</button></div><script>const yes=document.querySelector(".feedback--yes"),no=document.querySelector(".feedback--no");document.querySelectorAll(".feedback--link").forEach(e=>{e.href=e.href+window.location.pathname});const sendFeedback=e=>{gtag||console.log("!gtag"),gtag("event","click",{event_category:"Helpful",event_label:window.location.pathname,value:e})},disableButtons=()=>{yes.disabled=!0,yes.classList.add("feedback--button__disabled"),no.disabled=!0,no.classList.add("feedback--button__disabled")};yes.addEventListener("click",()=>{sendFeedback(1),disableButtons(),document.querySelector(".feedback--response").classList.remove("feedback--response__hidden")}),no.addEventListener("click",()=>{sendFeedback(0),disableButtons(),document.querySelector(".feedback--response").classList.remove("feedback--response__hidden")})</script><br><div class="text-muted mt-5 pt-3 border-top">Last modified January 2, 2023: <a href=https://github.com/apache/dubbo-website/commit/95a9f4f6c1cbb4425fe12411cd046f4463fee6b5>Enhance en docs (#1798) (95a9f4f6c1c)</a></div></div></main><div class="d-none d-xl-block col-xl-2 td-toc d-print-none"><div class="td-page-meta ml-2 pb-1 pt-2 mb-0"><a href=https://github.com/apache/dubbo-website/edit/master/content/en/overview/tasks/mesh/dubbo-mesh.md target=_blank><i class="fa fa-edit fa-fw"></i> Edit this page</a>
<a href="https://github.com/apache/dubbo-website/new/master/content/en/overview/tasks/mesh/dubbo-mesh.md?filename=change-me.md&amp;value=---%0Atitle%3A+%22Long+Page+Title%22%0AlinkTitle%3A+%22Short+Nav+Title%22%0Aweight%3A+100%0Adescription%3A+%3E-%0A+++++Page+description+for+heading+and+indexes.%0A---%0A%0A%23%23+Heading%0A%0AEdit+this+template+to+create+your+new+page.%0A%0A%2A+Give+it+a+good+name%2C+ending+in+%60.md%60+-+e.g.+%60getting-started.md%60%0A%2A+Edit+the+%22front+matter%22+section+at+the+top+of+the+page+%28weight+controls+how+its+ordered+amongst+other+pages+in+the+same+directory%3B+lowest+number+first%29.%0A%2A+Add+a+good+commit+message+at+the+bottom+of+the+page+%28%3C80+characters%3B+use+the+extended+description+field+for+more+detail%29.%0A%2A+Create+a+new+branch+so+you+can+preview+your+new+file+and+request+a+review+via+Pull+Request.%0A" target=_blank><i class="fa fa-edit fa-fw"></i> Create child page</a>
<a href="https://github.com/apache/dubbo-website/issues/new?title=Dubbo%20proxy%20mesh%20using%20Envoy%20&amp;amp;%20Istio" target=_blank><i class="fab fa-github fa-fw"></i> Create an issue</a>
<a href=https://github.com/apache/dubbo/issues/new target=_blank><i class="fas fa-tasks fa-fw"></i> Create project issue</a></div><nav id=TableOfContents><ul><li><a href=#1-overall-objective>1 Overall Objective</a></li><li><a href=#2-basic-process-and-working-principle>2 Basic process and working principle</a></li><li><a href=#3-detailed-steps>3 detailed steps</a><ul><li><a href=#31-environmental-requirements>3.1 Environmental requirements</a></li><li><a href=#32-create-an-independent-namespace-and-enable-automatic-injection>3.2 Create an independent namespace and enable automatic injection</a></li><li><a href=#33-deploy-to-kubernetes>3.3 Deploy to Kubernetes</a></li><li><a href=#34-check-the-normal-communication-between-provider-and-consumer>3.4 Check the normal communication between Provider and Consumer</a></li><li><a href=#35-traffic-governance---virtualservice-implements-proportional-traffic-forwarding>3.5 Traffic Governance - VirtualService implements proportional traffic forwarding</a></li><li><a href=#36-view-dashboard>3.6 View dashboard</a></li></ul></li><li><a href=#4-modified-example>4 Modified Example</a></li><li><a href=#5-common-commands>5 Common commands</a></li><li><a href=#6-notes>6 Notes</a></li></ul></nav></div></div></div></div><footer class="bg-dark py-5 row d-print-none footer-margin-0"><div class="container-fluid mx-sm-5"><div class=row><div class="col-6 col-sm-4 text-xs-center order-sm-2"><ul class="list-inline mb-0"><li class="list-inline-item mx-2 h3" data-toggle=tooltip data-placement=top title="Dubbo mailing list archive" aria-label="Dubbo mailing list archive"><a class=text-white target=_blank rel="noopener noreferrer" href=https://lists.apache.org/list.html?dev@dubbo.apache.org><i class="fa fa-envelope"></i></a></li></ul></div><div class="col-6 col-sm-4 text-right text-xs-center order-sm-3"><ul class="list-inline mb-0"><li class="list-inline-item mx-2 h3" data-toggle=tooltip data-placement=top title=GitHub aria-label=GitHub><a class=text-white target=_blank rel="noopener noreferrer" href=https://github.com/apache/dubbo><i class="fab fa-github"></i></a></li><li class="list-inline-item mx-2 h3" data-toggle=tooltip data-placement=top title="Subscribe to mailing list" aria-label="Subscribe to mailing list"><a class=text-white target=_blank rel="noopener noreferrer" href=mailto:dev-subscribe@dubbo.apache.org><i class="fa fa-envelope"></i></a></li></ul></div><div class="col-12 col-sm-4 text-center py-2 order-sm-2"><small class=text-white>&copy; 2024 The Apache Software Foundation. Apache and the Apache feather logo are trademarks of The Apache Software Foundation. All Rights Reserved</small></div></div></div></footer><div class="row pt-2 pb-2 footer-margin-0"><div class="container-fluid mx-sm-5"><div class=text-center id=my-footer><img alt=apache_logo src=/imgs/apache_logo.png><ul><li><a href=https://www.apache.org>Foundation</a></li><li><a href=https://www.apache.org/licenses/>License</a></li><li><a href=https://dubbo.apache.org/en/overview/notices/>Security</a></li><li><a href=https://www.apache.org/events/current-event>Events</a></li><li><a href=https://www.apache.org/foundation/sponsorship.html>Sponsorship</a></li><li><a href=https://privacy.apache.org/policies/privacy-policy-public.html>Privacy</a></li><li><a href=https://www.apache.org/foundation/thanks.html>Thanks</a></li></ul></div></div></div><script src=/js/popper.min.js integrity=sha384-ZMP7rVo3mIykV+2+9J3UJ46jBk0WLaUAdn689aCwoqbBJiSnjAK/l8WvCWPIPm49 crossorigin=anonymous></script><script src=/js/bootstrap.min.js integrity=sha384-ChfqqxuZUCnJSK3+MXmPNIyE6ZbWh2IMqE241rYiqJxyMiZ6OW/JmZQ5stwEULTy crossorigin=anonymous></script><script src=/js/main.min.b075178d232d3b0039b3cb6af2fc2e9d90071820167a60f4eea3a79169975ee8.js integrity="sha256-sHUXjSMtOwA5s8tq8vwunZAHGCAWemD07qOnkWmXXug=" crossorigin=anonymous></script><script async src=https://widget.kapa.ai/kapa-widget.bundle.js data-website-id=d763c4f2-f871-400b-aeca-d986c4af73c2 data-project-name="Apache Dubbo" data-project-color=#E8442E data-button-text="Ask AI" data-search-mode-enabled=true data-modal-open-on-command-k=true data-modal-disclaimer="The AI supports multiple languages, but it may not be accessible in China due to recaptcha, a proxy is required." data-project-logo=https://pbs.twimg.com/profile_images/1011849068283191302/FJbH5vbF_400x400.jpg data-modal-example-questions="What is Apache Dubbo?,How to run Apache Dubbo?" data-button-position-top data-button-position-right=20px data-button-position-bottom=200px data-button-position-left></script><script>(function(e,t,n,s){e[s]=e[s]||[];var a=t.getElementsByTagName(n)[0],i=t.createElement(n);i.async=!0,i.id="beacon-aplus",i.setAttribute("exparams","userid=&aplus&sidx=aplusSidex&ckx=aplusCkx"),i.src="//g.alicdn.com/alilog/mlog/aplus_v2.js",i.crossorigin="anonymous",a.parentNode.insertBefore(i,a)})(window,document,"script","aplus_queue"),function(e){var t=e.createElement("script");t.type="text/javascript",t.async=!0,t.src="//g.alicdn.com/aes/??tracker/3.3.4/index.js,tracker-plugin-pv/3.0.5/index.js,tracker-plugin-event/3.0.0/index.js,tracker-plugin-autolog/3.0.3/index.js,tracker-plugin-survey/3.0.3/index.js,tracker-plugin-jserror/3.0.3/index.js,tracker-plugin-resourceError/3.0.3/index.js",t.onload=function(){window.AES_CONFIG=window.AES_CONFIG||{env:"prod"},window.aes=new AES({pid:"zN245h",user_type:6}),window.AESPluginAutologConfig={exposure:"auto"},window.AEMPluginInstances=[aes.use(AESPluginPV,window.AESPluginPVConfig||{enableHistory:!0}),aes.use(AESPluginEvent,window.AESPluginEventConfig||{}),aes.use(AESPluginSurvey,window.AESPluginEventConfig||{}),aes.use(AESPluginAutolog,window.AESPluginAutologConfig||{}),aes.use(AESPluginJSError,window.AESPluginJSError||{}),aes.use(AESPluginResourceError,window.AESPluginResourceError||{})]},setTimeout(function(){e.getElementsByTagName("body")[0].appendChild(t)},800)}(document)</script></body></html>