이 페이지에서는 Cloud Run 워크로드용 Cloud Service Mesh를 구성하는 데 사용되는 API에 관한 참조를 제공합니다.
Cloud Run API
v1 API
Cloud Service Mesh는 버전 수준 주석을 사용하여 사용 설정됩니다.
이 주석의 값은 Cloud Service Mesh Istio 클러스터의 백킹 메시 이름입니다.
주석
값
run.googleapis.com/mesh
projects/PROJECT/locations/global/meshes/MESH
v2 API
Cloud Service Mesh는 Service 리소스의 serviceMesh 필드를 사용하여 사용 설정됩니다.
Cloud Service Mesh Istio API
VirtualService API
필드 이름
유형
필드 설명
게이트웨이
문자열[]
게이트웨이에 'external-mesh'가 포함된 경우 가상 서비스는 GKE 외의 워크로드에만 적용됩니다.
'external-mesh'와 함께 'mesh'가 지정되면 가상 서비스가 GKE 외의 워크로드와 GKE 워크로드 모두에 적용됩니다.
exportTo
문자열
GKE 외의 워크로드에는 네임스페이스 개념이 없으므로 'external-mesh' 가상 서비스는 exportTo 필드를 무시합니다.
그러나 '메시'가 있는 가상 서비스에서는 계속 작동하며, 게이트웨이는 GKE 워크로드에서 계속 정상적으로 작동합니다.
httpRoute.HTTPMatchRequest.SourceLabels
map<string, string=""></string,>
'external-mesh' 가상 서비스의 경우 무시됩니다.
그러나 '메시'가 있는 가상 서비스에서는 계속 작동하며, 게이트웨이는 GKE 워크로드에서 계속 정상적으로 작동합니다.
httpRoute.HTTPMatchRequest.SourceNamespace
문자열
'external-mesh' 가상 서비스의 경우 무시됩니다.
그러나 '메시'가 있는 가상 서비스에서는 계속 작동하며, 게이트웨이는 GKE 워크로드에서 계속 정상적으로 작동합니다.
httpRoute.HTTPMatchRequest.Gateways
문자열[]
'external-mesh' 가상 서비스의 경우 무시됩니다.
그러나 '메시'가 있는 가상 서비스에서는 계속 작동하며, 게이트웨이는 GKE 워크로드에서 계속 정상적으로 작동합니다.
tls
tlsRoute[]
'external-mesh' 가상 서비스의 경우 무시됩니다.
그러나 '메시'가 있는 가상 서비스에서는 계속 작동하며, 게이트웨이는 GKE 워크로드에서 계속 정상적으로 작동합니다.
tcp
tcpRoute[]
'external-mesh' 가상 서비스의 경우 무시됩니다.
그러나 '메시'가 있는 가상 서비스에서는 계속 작동하며, 게이트웨이는 GKE 워크로드에서 계속 정상적으로 작동합니다.
Istio 자동 mTLS 및 보안 이름 지정
현재 Cloud Service Mesh는 GKE 서비스 간 요청에 대해 자동 Istio MutualTLS 및 보안 이름 지정을 지원합니다.
프리뷰의 경우 GKE 워크로드/서비스와 통신하는 GKE 외의 워크로드는 Istio 자동 MTLS 또는 보안 이름 지정을 사용하지 않습니다. 트래픽은 일반 텍스트로 전송됩니다. GKE 서비스에 GKE 워크로드의 mTLS 트래픽과 GKE 외의 워크로드의 일반 텍스트를 허용하는 관대한 mTLS 정책(Istio API 기본값)이 있는지 확인합니다.
다음 명령어를 사용하여 PeerAuthentication이 허용 모드인지 확인합니다.
# list PeerAuthentication resources in a namespace# If no PeerAuthentication resource exists in the namespace, # then it's PERMISSIVE mode (Istio API default)
kubectlgetPeerAuthentication-n$NAMESPACE# for each of the above run the following command
kubectlgetPeerAuthentication$PEER-AUTHN-n$NAMESPACE# Expected Output is as follows:# MTLS Mode must be PERMISSIVE.# If the output says STRICT, then please update the policy to PERMISSIVE.
apiVersion:security.istio.io/v1
kind:PeerAuthentication
metadata:
name:$PEER-AUTHN
namespace:$NAMESPACE
spec:
mtls:
mode:PERMISSIVE
MeshConfig 원격 분석
Cloud Service Mesh는 MeshConfig 원격 분석 API를 지원하여 GKE 워크로드의 Cloud Logging 및 Cloud Monitoring을 사용 설정 및 사용 중지합니다.
GKE 이외의 워크로드에도 비슷하게 작동합니다.
대상 규칙
프리뷰의 경우 DestinationRule이 'external-mesh' 가상 서비스를 타겟팅하는 기능은 다음 필드를 제외하고 지원됩니다. trafficPolicy.tls
Sidecar API
Sidecar API는 GKE 이외의 워크로드에는 적용되지 않습니다.
GKE 이외의 워크로드는 사이드카 공개 상태 규칙에 의해 필터링되지 않고 'external-mesh'로 범위가 지정된 모든 가상 서비스를 볼 수 있습니다.
Security API - 승인 정책, 요청 인증 정책
이는 아웃바운드 트래픽을 전송하는 클라이언트 역할을 하는 GKE 이외의 워크로드에는 적용되지 않습니다. 수신 트래픽을 받는 GKE 워크로드는 계속 적용됩니다.
GCPBackend API
필드 이름
유형
필드 설명
GCPBackend
struct
GCPBackend 리소스의 스키마입니다.
TypeMeta
metav1.TypeMeta
종류 및 API 버전과 같은 메타데이터 정보를 저장하기 위한 삽입된 구조체입니다.
ObjectMeta
metav1.ObjectMeta
이름, 네임스페이스, 라벨, 주석과 같은 메타데이터 정보를 저장하기 위한 삽입된 구조체입니다.
사양
GCPBackendSpec
GCPBackend 리소스의 사양으로, 원하는 상태를 정의합니다.
GCPBackendSpec
struct
GRPCRoute에 대해 원하는 상태를 정의합니다.
BackendService
*BackendServiceBackend
백엔드 서비스를 정의합니다. (선택사항).
BackendServiceBackend
struct
백엔드 서비스를 식별합니다.
이름
문자열
BackendService 이름입니다. 1~49자(영문 기준) 사이여야 하며 특정 패턴을 따라야 하고 소문자, 하이픈, 숫자로만 구성되어야 합니다.
위치
위치
BackendService의 위치입니다. CSM의 경우 전역이어야 합니다. (관리형 LB의 경우 리전/전역) 기본값은 클러스터와 동일한 위치입니다.
프로젝트
문자열
BackendService의 프로젝트 ID입니다. 기본값은 GKE 클러스터와 동일한 프로젝트입니다. 6~30자(영문 기준)여야 하며 특정 패턴을 따라야 합니다. 현재 BackendService와 GKE 클러스터가 동일한 프로젝트에 있어야 합니다.
GCPBackendList
struct
GCPBackends 목록을 포함합니다.
항목
[]*GCPBackend
GCPBackend 리소스 목록을 나타내는 GCPBackend 포인터 배열입니다.
ListMeta
metav1.ListMeta
리소스 버전, 페이지 나누기를 위한 계속 토큰과 같은 목록 메타데이터 정보를 저장하기 위한 삽입된 구조체입니다.
[[["이해하기 쉬움","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-03(UTC)"],[],[],null,["# Cloud Run API reference\n=======================\n\n|\n| **Preview**\n|\n|\n| This product or feature is subject to the \"Pre-GA Offerings Terms\" in the General Service Terms section\n| of the [Service Specific Terms](/terms/service-terms#1).\n|\n| Pre-GA products and features are available \"as is\" and might have limited support.\n|\n| For more information, see the\n| [launch stage descriptions](/products#product-launch-stages).\n| **Note:** This guide only supports Cloud Service Mesh with Istio APIs and does not support Google Cloud APIs. For more information see, [Cloud Service Mesh overview](/service-mesh/v1.24/docs/overview).\n\nThis page provides a reference for the APIs that are used to configure\nCloud Service Mesh for Cloud Run workloads.\n\nCloud Run API\n-------------\n\n### v1 API\n\nCloud Service Mesh is enabled using a [Revision level annotation](/run/docs/reference/yaml/v1).\nThe value of this annotation is the backing mesh name of the\nCloud Service Mesh Istio cluster.\n\n### v2 API\n\nCloud Service Mesh is enabled using the `serviceMesh` field in the\n[`Service` resource](/run/docs/reference/rest/v2/projects.locations.services#Service)\n\nCloud Service Mesh Istio API\n----------------------------\n\n### VirtualService API\n\n### Istio Auto MTLS and Secure Naming\n\nCurrently, Cloud Service Mesh supports Automatic Istio MutualTLS and Secure\nNaming for requests between GKE Services.\n\nFor Preview, non-GKE workloads communicating with\nGKE workloads/services will not use Istio Auto MTLS nor Secure\nNaming. The traffic will be in plain text. Make sure that GKE\nServices have a permissive MTLS policy (which is the Istio API default) which\naccepts MTLS traffic from GKE workloads and plain text from\nnon-GKE workloads.\n\nUse the following command to check if PeerAuthentication is in permissive mode: \n\n # list PeerAuthentication resources in a namespace\n # If no PeerAuthentication resource exists in the namespace, \n # then it's PERMISSIVE mode (Istio API default)\n kubectl get PeerAuthentication -n $NAMESPACE\n\n # for each of the above run the following command\n kubectl get PeerAuthentication $PEER-AUTHN -n $NAMESPACE\n\n # Expected Output is as follows:\n # MTLS Mode must be PERMISSIVE.\n # If the output says STRICT, then please update the policy to PERMISSIVE.\n apiVersion: security.istio.io/v1\n kind: PeerAuthentication\n metadata:\n name: $PEER-AUTHN\n namespace: $NAMESPACE\n spec:\n mtls:\n mode: PERMISSIVE\n\n### MeshConfig Telemetry\n\nCloud Service Mesh supports MeshConfig telemetry API to enable and disable\nCloud Logging and Cloud Monitoring for GKE workloads.\nThis will work similarly for non-GKE workloads as well.\n\n### Destination Rule\n\nFor Preview, `DestinationRule` targeting the \"external-mesh\" virtual services\nwill be supported except following fields: `trafficPolicy.tls`\n\n### Sidecar API\n\nSidecar API will not be applicable to non-GKE workloads.\nNon-GKE workloads will be able to see all the virtual services\nscoped to \"external-mesh\" without being filtered by any Sidecar visibility rules.\n\n### Security API - Authorization Policy, Request Authentication Policy\n\nThese will not apply to non-GKE workloads which act as Clients\nsending outbound traffic. They will continue to apply GKE\nworkloads that receive inbound traffic.\n\n### GCPBackend API\n\n| **Note:** This is a Kubernetes Custom Resource."]]