networkservices.meshes.use 권한이 부여된 모든 서비스 소유자는 이 Mesh 리소스에 라우팅 규칙을 추가할 수 있습니다.
서비스 프로젝트에서 라우팅 설정
각 서비스 소유자는 사이드카 프록시 구성 가이드의 예시와 비슷하게 해당 프로젝트에 하나 이상의 백엔드 서비스 및 Route 리소스를 만들어야 합니다.
유일한 차이점은 각 HTTPRoute, GRPCRoute 또는 TCPRoute 리소스에는 meshes 필드에 호스트 프로젝트의 Mesh 리소스 URI가 있어야 한다는 점입니다.
다음을 사용하여 meshes 필드를 채웁니다. 프로젝트 ID 또는 프로젝트 번호를 사용할 수 있습니다.
서비스 프로젝트에 있는 Cloud Service Mesh 클라이언트를 구성할 때 부트스트랩 구성은 Mesh 리소스가 있는 프로젝트 번호와 Mesh 이름을 지정해야 합니다. 이 요구사항은 Envoy 프록시와 프록시리스 gRPC 배포 모두에 적용됩니다.
Envoy 배포의 경우 --service-proxy:project-number 옵션을 사용합니다.
다음 단계
Mesh 또는 Gateway 리소스와 연결된 경로 리소스 나열에 관한 자세한 내용은 Route 리소스 나열 참조하기.
[[["이해하기 쉬움","easyToUnderstand","thumb-up"],["문제가 해결됨","solvedMyProblem","thumb-up"],["기타","otherUp","thumb-up"]],[["이해하기 어려움","hardToUnderstand","thumb-down"],["잘못된 정보 또는 샘플 코드","incorrectInformationOrSampleCode","thumb-down"],["필요한 정보/샘플이 없음","missingTheInformationSamplesINeed","thumb-down"],["번역 문제","translationIssue","thumb-down"],["기타","otherDown","thumb-down"]],["최종 업데이트: 2025-09-04(UTC)"],[],[],null,["# Set up cross-project references\n===============================\n\n| **Note:** This guide only supports Cloud Service Mesh with Google Cloud APIs and does not support Istio APIs. For more information see, [Cloud Service Mesh overview](/service-mesh/docs/overview).\n\nThis document applies only to Cloud Service Mesh with the Google Cloud\nservice routing APIs. Don't use this document if you are configuring\nCloud Service Mesh with the Istio APIs.\n\nIn some scenarios, the service mesh configuration includes services that\nare in different projects. For example, in Shared VPC or peered VPC\ndeployments it is possible for each project owner to define their own set\nof services to make these services available to all other projects.\n[](/static/service-mesh/v1.23/docs/images/cross-ref-setup.svg) Cross-project configuration with `Mesh` resources (click to enlarge)\n\nThis configuration is called a *cross-project* configuration because\nmultiple resources defined in different projects are combined to form a\nsingle configuration that can be served to an Envoy proxy or proxyless gRPC\nclient.\n\nThe following instructions use the `Mesh` and `HTTPRoute` resources, but they\ncan be applied to the `Gateway` resource and to the\n`GRPCRoute` and `TCPRoute` resources.\n\nConfigure the `Mesh` resource\n-----------------------------\n\nDesignate a project as the host project where you administer the\n`Mesh` resource. Any service account with the permissions to create,\nupdate, or delete `Mesh` resources in this project can control the routing\nconfigurations attached to `Mesh` resources in this project.\n\n1. In the file `shared-mesh.yaml`, create a `Mesh` specification.\n\n ```\n name: shared-mesh\n interceptionPort: 15001\n ```\n2. Define a `Mesh` resource in this project.\n\n ```\n gcloud network-services meshes import shared-mesh \\\n --source=shared-mesh.yaml \\\n --location=global\n ```\n3. Write down the full URI of the `Mesh` resource, because service owners\n need the URI to attach their routes to this `Mesh`.\n\n ```\n /projects/[HOST_PROJECT_NUMBER]/locations/global/meshes/shared-mesh\n ```\n4. Grant the `networkservices.meshes.use` IAM permission for this `Mesh`\n to the cross-project service accounts that should be able to attach their\n services information to this `Mesh`.\n\n ```\n gcloud projects add-iam-policy-binding [HOST_PROJECT_NUMBER]\n --member='[HTTP_ROUTE_SERVICE_OWNER_ACCOUNT]'\n --role='roles/compute.networkAdmin'\n ```\n\nAll service owners that have`networkservices.meshes.use`\npermission granted to them are able to add their routing rules to this `Mesh`\nresource.\n\nSet up routing in the service projects\n--------------------------------------\n\nEach service owner needs to create one or more backend service and `Route`\nresources in their project, similar to the example in the\n[sidecar proxy configuration guide](/service-mesh/v1.23/docs/service-routing/set-up-envoy-http-mesh).\nThe only difference is that each `HTTPRoute`, `GRPCRoute`, or `TCPRoute`\nresource must have the URI of the host project's `Mesh` resource in the `meshes`\nfield.\n\n1. Use the following to populate the `meshes` field. You can use either the\n project ID or the project number.\n\n ```\n echo \"name: sharedvpc-http-route\n hostnames:\n - helloworld-gce\n meshes:\n - /projects/[HOST_PROJECT_NUMBER]/locations/global/meshes/shared-mesh\n rules:\n - action:\n destinations:\n - serviceName: \\\"url/of/the/service\\\"\" | \\\n gcloud network-services http-routes import sharedvpc-http-route \\\n --source=- \\\n --location=global\n ```\n\nCreate the client services in the service projects\n--------------------------------------------------\n\nWhen you configure a Cloud Service Mesh client that is located in a service\nproject, the bootstrap configuration must specify the project number where the\n`Mesh` resource is located and the `Mesh` name. This requirement applies to both\n[Envoy proxy](/service-mesh/v1.23/docs/service-routing/set-up-envoy-http-mesh#client) and\n[proxyless gRPC deployments](/service-mesh/v1.23/docs/service-routing/set-up-proxyless-mesh#set-up-bootstrap).\nWith Envoy deployments, use the `--service-proxy:project-number` option.\n\nWhat's next\n-----------\n\n- For information about listing route resources associated with a `Mesh` or `Gateway` resource, see [List `Route` resources](/service-mesh/v1.23/docs/service-routing/list-route-resources)."]]