Access published services through endpoints
This document explains how toaccessservices in anotherVPC network by using Private Service Connectendpoints. You can connect to your own services, or those provided by otherservice producers, including by Google.
For more information about services, seepublish managedservices.
Before you begin
- ReadAbout connecting to services by usingendpoints,including limitations.
- You mustenabletheCompute Engine API in yourproject.
- You mustenabletheService Directory APIin your project.
- You mustenabletheCloud DNS API in your project.
- Identify or create aregular subnet to use toassign an IP address for the endpoint.
- The subnet must be in the same region as the service that you want toconnect to.
- You can use an IPv4 address from an IPv4-only subnet or a dual-stacksubnet.
- You can use an IPv6 address from an IPv6-onlyor dual-stack subnet if the subnet hasaninternal IPv6 address range.
- The IP version of the IP address affects which published services theendpoint can connect to. For more information, seeIP versiontranslation.
- Egress firewall rules must permit traffic to the internal IP addressof the endpoint. Theimplied allowegress firewall rulepermits egress to any destination IP address. If you've created anyegress deny firewall rules in your VPC network, or ifyou've created hierarchical firewall policies which modify theimplied allowed egress behavior, access to the endpoint might beaffected. Create a specific egress allow firewall rule or policy topermit traffic to the service endpoint's internal IP addressdestination.
- You must have the URI of the service attachment for the service. Forexample,
projects/SERVICE_PROJECT/regions/REGION/serviceAttachments/SERVICE_NAME
Required roles
To get the permissions that you need to access published services through endpoints, ask your administrator to grant you the following IAM roles:
- Create, view, and delete endpoints in your project:Compute Network Admin (
roles/compute.networkAdmin) on your project - Create, view, and delete endpoints in a Shared VPC service project:
- Compute Network Admin (
roles/compute.networkAdmin) on the service project - Compute Network User (
roles/compute.networkUser) on the host project
- Compute Network Admin (
- Automatically or manually configure DNS entries for an endpoint in your project:
- DNS Administrator (
roles/dns.admin) on your project - Service Directory Editor (
roles/servicedirectory.editor) on your project
- DNS Administrator (
- Automatically or manually configure DNS entries for an endpoint in a Shared VPC service project:
- DNS Administrator (
roles/dns.admin) on the service project - Service Directory Editor (
roles/servicedirectory.editor) on the service project
- DNS Administrator (
For more information about granting roles, seeManage access to projects, folders, and organizations.
These predefined roles contain the permissions required to access published services through endpoints. To see the exact permissions that are required, expand theRequired permissions section:
Required permissions
The following permissions are required to access published services through endpoints:
- To create, view, and delete endpoints in your project:
compute.networks.useon your projectcompute.subnetworks.useon your projectcompute.addresses.createInternalon your projectcompute.addresses.deleteInternalon your projectcompute.addresses.geton your projectcompute.addresses.liston your projectcompute.addresses.useon your projectcompute.forwardingRules.createon your projectcompute.forwardingRules.deleteon your projectcompute.forwardingRules.geton your projectcompute.forwardingRules.liston your projectcompute.forwardingRules.pscCreateon your projectcompute.forwardingRules.pscDeleteon your projectcompute.regionOperations.geton your projectservicedirectory.namespaces.createon your projectservicedirectory.namespaces.deleteon your projectservicedirectory.services.createon your projectservicedirectory.services.deleteon your project
- To create, view, and delete endpoints in a service project that is attached to a Shared VPC network:
compute.addresses.createInternalon the service projectcompute.addresses.deleteInternalon the service projectcompute.addresses.geton the service projectcompute.addresses.liston the service projectcompute.addresses.useon the service projectcompute.forwardingRules.createon the service projectcompute.forwardingRules.deleteon the service projectcompute.forwardingRules.geton the service projectcompute.forwardingRules.liston the service projectcompute.forwardingRules.pscCreateon the service projectcompute.forwardingRules.pscDeleteon the service projectcompute.regionOperations.geton the service projectservicedirectory.namespaces.createon the service projectservicedirectory.namespaces.deleteon the service projectservicedirectory.services.createon the service projectservicedirectory.services.deleteon the service projectcompute.networks.useon the host projectcompute.subnetworks.useon the host project
- To automatically or manually configure DNS entries for an endpoint in your project:
dns.managedZones.createon your projectdns.managedZones.deleteon your projectdns.networks.bindPrivateDNSZoneon your projectservicedirectory.namespaces.associatePrivateZoneon your project
- To automatically or manually configure DNS entries for an endpoint in a Shared VPC network:
dns.managedZones.createon the service projectdns.managedZones.deleteon the service projectdns.networks.bindPrivateDNSZoneon the service projectservicedirectory.namespaces.associatePrivateZoneon the service project
- To access the Private Service Connect page in the Google Cloud console:
compute.forwardingRules.liston your projectcompute.globalForwardingRules.liston your projectcompute.networkEndpointGroups.liston your projectcompute.regionNetworkEndpointGroups.liston your projectcompute.urlMaps.liston your projectcompute.backendService.liston your projectcompute.regionBackendService.liston your projectcompute.backendBucket.liston your projectcompute.targetHttpProxy.liston your projectcompute.targetHttpsProxy.liston your projectcompute.regionTargetTcpProxy.liston your projectcompute.targetTcpProxy.liston your projectcompute.targetSslProxy.liston your projectcompute.sslCertificate.liston your projectcompute.sslPolicy.liston your projectcompute.regionHealthCheck.liston your projectcompute.healthCheck.liston your projectcompute.httpHealthCheck.liston your projectcompute.httpsHealthCheck.liston your project
You might also be able to get these permissions withcustom roles or otherpredefined roles.
Create an endpoint
An endpoint connects to services inanother VPC network using aPrivate Service Connect forwarding rule. Each forwarding rulecounts toward theper project quota forPrivate Service Connect forwarding rules to access services inanother VPC network.
When you create an endpoint, it isautomatically registered withService Directory, usinga namespace that you choose, or the default namespace,goog-psc-default.
If you want to make the endpoint available from more than one region, turn onglobal access.
You can only update the global access field of endpoints for published services.If you want to update other fields, delete the endpoint, and then create a newone.
Console
In the Google Cloud console, go to thePrivate Service Connect page.
Click theConnected endpoints tab.
ClickConnect endpoint.
ForTarget, selectPublished service.
ForTarget service, enter the service attachment URI that you want to connect to.
The service attachment URI is in this format:
projects/SERVICE_PROJECT/regions/REGION/serviceAttachments/SERVICE_NAMEForEndpoint name, enter a name to use for the endpoint.
Select aNetwork for the endpoint.
Select aSubnetwork for the endpoint.
Select anIP address for the endpoint.If you need a new IP address, you can create one:
- Click theIP address drop-down menu and selectCreate IP address.
- Enter aName and optionalDescription for the IP address.
- Select anIP version.
If you're creating an IPv4 address, selectAssign automatically orLet me choose.
If you selectedLet me choose, enter theCustom IP addressyou want to use.
ClickReserve.
To make the endpoint available from any region, selectEnable globalaccess.
Select aNamespace from the drop-down list or create a new namespace.
TheRegion is populated based on the selected subnetwork.
ClickAdd endpoint.
gcloud
Reserve an internal IP address to assign to the endpoint.
gcloud compute addresses createADDRESS_NAME \ --region=REGION \ --subnet=SUBNET \ --ip-version=IP_VERSION
Replace the following:
ADDRESS_NAME: the name to assign to thereserved IP address.REGION: the region for the endpoint IP address.This must be the same region that contains the service producer'sservice attachment.SUBNET: the name of the subnet for the endpointIP address.IP_VERSION: the IP version of the IP address, whichcan be eitherIPV4orIPV6.IPV4is the default. To specifyIPV6, the IP address must be connected to asubnet with an internal IPv6 address range.
Find the reserved IP address.
gcloud compute addresses list --filter="name=ADDRESS_NAME"
Create a forwarding rule to connect the endpoint to the serviceproducer's service attachment. By default, endpoints are availableonly from their own region. To make an endpoint available from anyregion, use the
--allow-psc-global-accessflag.Create an endpoint that can be accessed only from its own region.
gcloud compute forwarding-rules createENDPOINT_NAME \ --region=REGION \ --network=NETWORK_NAME \ --address=ADDRESS_NAME \ --target-service-attachment=SERVICE_ATTACHMENT \ [ --service-directory-registration=projects/PROJECT_ID/locations/REGION/namespaces/NAMESPACE ]
Create an endpoint that can be accessed from any region.
gcloud compute forwarding-rules createENDPOINT_NAME \ --region=REGION \ --network=NETWORK_NAME \ --address=ADDRESS_NAME \ --target-service-attachment=SERVICE_ATTACHMENT \ --allow-psc-global-access \ [ --service-directory-registration=projects/PROJECT_ID/locations/REGION/namespaces/NAMESPACE ]
Replace the following:
ENDPOINT_NAME: the name to assign to the endpoint.REGION: the region for the endpoint. This must bethe same region that contains the service producer's service attachment.NETWORK_NAME: the name of the VPCnetwork for the endpoint.ADDRESS_NAME: the name of the reserved address.SERVICE_ATTACHMENT: the URI of the serviceproducer's service attachment. For example:projects/SERVICE_PROJECT/regions/REGION/serviceAttachments/SERVICE_NAMEPROJECT_ID: your project ID.NAMESPACE: the Service Directorynamespace that you want to use. If you specify a namespace that doesn'texist, the namespace is created.If you omit the
--service-directory-registrationflag, the defaultnamespace ofgoog-psc-defaultis used.
API
Reserve an internal IP address to assign to the endpoint.
POST https://compute.googleapis.com/compute/v1/projects/PROJECT_ID/regions/REGION/addresses{ "name": "ADDRESS_NAME", "addressType": "INTERNAL", "subnetwork": "SUBNET_URI", "ipVersion": "IP_VERSION"}Replace the following:
PROJECT_ID: your project ID.REGION: the region for the endpoint. This must bethe same region that contains the service producer's service attachment.ADDRESS_NAME: the name to assign to thereserved IP address.SUBNET_URI: the subnet for theIP address. Use thesubnetworks.listmethod orgcloudcompute networks subnets list --urito find the URLs of your networks.IP_VERSION: the IP version of the IP address, whichcan be eitherIPV4orIPV6.IPV4is the default. To specifyIPV6, the IP address must be connected to asubnet with an internal IPv6 address range.
Create a forwarding rule to connect the endpoint to the serviceproducer's service attachment. By default, endpoints are availableonly from their own region. To make an endpoint available from anyregion, set
allowPscGlobalAccesstotrue.Create an endpoint that can be accessed only from its own region.
POST https://compute.googleapis.com/compute/v1/projects/PROJECT_ID/regions/REGION/forwardingRules{ "name": "ENDPOINT_NAME", "IPAddress": "ADDRESS_URI", "target": "SERVICE_ATTACHMENT", "network": "NETWORK_URI", "serviceDirectoryRegistrations": [ { "namespace": "NAMESPACE" } ]}Create an endpoint that can be accessed from any region.
POST https://compute.googleapis.com/compute/v1/projects/PROJECT_ID/regions/REGION/forwardingRules{ "name": "ENDPOINT_NAME", "IPAddress": "ADDRESS_URI", "target": "SERVICE_ATTACHMENT", "network": "NETWORK_URI", "allowPscGlobalAccess": true, "serviceDirectoryRegistrations": [ { "namespace": "NAMESPACE" } ]}
Replace the following:
PROJECT_ID: your project ID.REGION: the region for the endpoint.ENDPOINT_NAME: the name to assign to the endpoint.ADDRESS_URI: the URI of the reserved address on theassociated network. Use theaddresses.listmethod orgcloudcompute addresses list --urito find the URL of your reservedaddress.SERVICE_ATTACHMENT: the URI of the service producer'sservice attachment. For example:projects/SERVICE_PROJECT/regions/REGION/serviceAttachments/SERVICE_NAMENETWORK_URI: the VPC network for theendpoint. Use thenetwork.listmethod orgcloudcompute networks list --urito find the URI of your network.NAMESPACE: the namespace for the endpoint. If youspecify a namespace that doesn't exist, the namespace is created. If youomit thenamespacefield, the default namespace ofgoog-psc-defaultisassigned.
Create an endpoint with an IP address from a Shared VPC network
Service Project Admins can createendpoints in Shared VPC serviceprojects that use IP addresses from connectedShared VPC networks.Creating endpoints of this type is not available in the Google Cloud console. Youmust use the Google Cloud CLI or send an API request. For more information, seeShared VPC.
This example shows how to create an endpoint with an IP address from aShared VPC network that can be accessed from a single region. To enableglobal access, or to choose a namespace for Service Directory, seeCreate an endpoint.
gcloud
To reserve an internal IP address to assign to the endpoint, do one ofthe following:
- In the service project,reserve a static internal IPv4 or IPv6address froma shared subnet of the Shared VPC network.
- In the host project, ask aShared VPC Admin toreserve a static internal IPv4 or IPv6 addressfrom a shared subnet of the Shared VPC network.
The IP address must be in the same region as the service producer'sservice attachment.
To create the endpoint in the service project, do one of the following.
If you have permission to use all subnets in the host project, usethe following command:
gcloud compute forwarding-rules createENDPOINT_NAME \ --region=REGION \ --network=projects/HOST_PROJECT/global/networks/HOST_NETWORK \ --address=projects/ADDRESS_PROJECT/regions/REGION/addresses/ADDRESS_NAME \ --target-service-attachment=SERVICE_ATTACHMENT
Replace the following:
ENDPOINT_NAME: the name to assign to theendpoint.REGION: the region for the endpoint. This must bethe same region that contains the service producer's serviceattachment.HOST_PROJECT: the project ID of theShared VPC network's project.HOST_NETWORK: the name of theShared VPCnetwork that contains the endpoint's IP address.ADDRESS_PROJECT: the ID of the project that youreserved the IP address in. This can be either the service projector the host project.ADDRESS_NAME: the name of the reserved IPaddress.SERVICE_ATTACHMENT: the URI of the serviceproducer's service attachment. For example:projects/SERVICE_PROJECT/regions/REGION/serviceAttachments/SERVICE_NAME
If you have permission to use only some subnets in the host project,specify a shared subnet by using the following command:
gcloud compute forwarding-rules createENDPOINT_NAME \ --region=REGION \ --subnet=projects/HOST_PROJECT/regions/REGION/subnetworks/HOST_SUBNET \ --address=projects/ADDRESS_PROJECT/regions/REGION/addresses/ADDRESS_NAME \ --target-service-attachment=SERVICE_ATTACHMENT
Replace
HOST_SUBNETwith the name of the subnet thatcontains the endpoint's IP address.
API
To reserve an internal IP address to assign to the endpoint, do one ofthe following:
- In the service project,reserve a static internal IPv4 or IPv6address froma shared subnet of the Shared VPC network.
- In the host project, ask a host project admin toreserve a staticinternal IPv4 or IPv6addressfrom a shared subnet of the Shared VPC network.
The IP address must be in the same region as the service producer's serviceattachment.
To create the endpoint in the service project, do one of the following.
If you have permission to use all subnets in the host project, makethe following request:
POST https://compute.googleapis.com/compute/v1/projects/PROJECT/regions/REGION/forwardingRules{ "name": "ENDPOINT_NAME", "IPAddress": "projects/ADDRESS_PROJECT/regions/REGION/addresses/ADDRESS_NAME", "target": "SERVICE_ATTACHMENT", "network": "projects/HOST_PROJECT/global/networks/HOST_NETWORK"}Replace the following:
PROJECT: the service project ID.REGION: the region for the endpoint. Thismust be the same region that contains the service producer'sservice attachment.ENDPOINT_NAME: the name to assign to theendpoint.ADDRESS_PROJECT: the ID of the projectthat you reserved the IP address in. This can be either theservice project or the host project.ADDRESS_NAME: the name of the reserved IPaddress.SERVICE_ATTACHMENT: the URI of theservice producer's service attachment. For example:projects/SERVICE_PROJECT/regions/REGION/serviceAttachments/SERVICE_NAMEHOST_PROJECT: the project ID of theShared VPC network's project.HOST_NETWORK: the name of theShared VPC network that contains the endpoint's IPaddress.
If you have permission to use only some subnets in the host project,specify a shared subnet by making the following request:
POST https://compute.googleapis.com/compute/v1/projects/PROJECT/regions/REGION/forwardingRules{ "name": "ENDPOINT_NAME", "IPAddress": "projects/ADDRESS_PROJECT/regions/REGION/addresses/ADDRESS_NAME", "target": "SERVICE_ATTACHMENT", "subnetwork": "projects/HOST_PROJECT/regions/REGION/subnetworks/HOST_SUBNET"}Replace
HOST_SUBNETwith the name of the subnetthat contains the endpoint's IP address.
List endpoints
You can list all configured endpoints.
Console
In the Google Cloud console, go to thePrivate Service Connect page.
Click theConnected endpoints tab.
The endpoints aredisplayed.
gcloud
gcloud compute forwarding-rules list \ --filter 'target~serviceAttachments'
The output is similar to the following:
NAME REGION IP_ADDRESS IP_PROTOCOL TARGETRULEIP TCPREGION/serviceAttachments/SERVICE_NAME
API
This API call returns all forwarding rules, not onlyendpoints used to access services.
GET https://compute.googleapis.com/compute/v1/projects/PROJECT_ID/regions/REGION/forwardingRules
Replace the following:
PROJECT_ID: the project that contains the endpoint.REGION: the region for the endpoint.
View endpoint details
You can view all the configuration details of anendpoint, including the endpoint'sconnection statusand URI.
To find a Private Service Connect endpoint's ID-based URI, use theGoogle Cloud CLI or send an API request.The ID-based URI is displayed in theselfLinkWithId field. The serviceproducer might need this URI if the service attachment's consumer accept list isconfigured to accept consumers based on individualPrivate Service Connect endpoints.
Console
In the Google Cloud console, go to thePrivate Service Connect page.
Click theConnected endpoints tab.
Click the endpoint that you want to view.
gcloud
gcloud compute forwarding-rules describe \ENDPOINT_NAME --region=REGION
Replace the following:
ENDPOINT_NAME: the name of the endpoint.REGION: the region for the endpoint.
API
GET https://compute.googleapis.com/compute/v1/projects/PROJECT_ID/regions/REGION/forwardingRules/ENDPOINT_NAME
Replace the following:
PROJECT_ID: the project that contains the endpoint.REGION: the region for the endpoint.ENDPOINT_NAME: the name of the endpoint.
Label an endpoint
You can manage labels for endpoints. For detailed instructions, seelabeling resources.
Delete an endpoint
You can delete an endpoint.
However, the following Service Directory configurations arenotdeleted when you delete the endpoint:
- Service Directory namespace
- Service Directory DNS zone
The Service Directory namespace andService Directory DNS zone can be used by other services. Check thatthe namespace is empty before youdelete the Service Directorynamespaceordelete the Service Directory DNSzone.
Note: When you delete a project, all resources in the project, includingendpoints, are marked for deletion.However, the resources are not immediately deleted. For more information aboutproject deletion, seeShutting downprojects.Console
In the Google Cloud console, go to thePrivate Service Connect page.
Click theConnected endpoints tab.
Select the endpoint that you want todelete, and then clickDelete.
gcloud
gcloud compute forwarding-rules deleteENDPOINT_NAME \ --region=REGION
Replace the following:
ENDPOINT_NAME: the name of the endpoint.REGION: the region for the endpoint.
API
DELETE https://compute.googleapis.com/compute/v1/projects/PROJECT_ID/regions/REGION/forwardingRules/ENDPOINT_NAME
Replace the following:
PROJECT_ID: the project that contains the endpoint.REGION: the region for the endpoint.ENDPOINT_NAME: the name of the endpoint.
Access endpoints from hybrid networks
Clients in networks that are connected to Google Cloud with VLANattachments for Cloud Interconnect or Cloud VPN tunnels can reachPrivate Service Connect endpoints.The VLAN attachment or Cloud VPN tunnel must terminate in the sameVPC network (or Shared VPC network) as the endpoint.Clients in peered VPC networks cannot reach endpoints.
Client traffic from VLAN attachments or Cloud VPN tunnels can reachendpoints in another region ifglobal access is configured.
Both Dataplane v1 and Dataplane v2 are supported for the VLAN attachments.For more information about Dataplane versions, seeDataplane v2.
If you want to access the endpointby using its DNS name, you must configure systems in the other network so thatthey can make queries to your private DNS zones.
If you implemented the private DNS zones by using Cloud DNS, completethe following steps:
Create aninbound server policy in theVPC network to which your other network connects.
Identify theinbound forwarder entry pointsin the region where your VLAN attachment or Cloud VPN tunnel islocated, in the VPC network to which your other networkconnects.
Configure systems and DNS name servers in the other network to forward theDNS names for the endpoint to an inbound forwarder entrypoint in the same region as the VLAN attachment or Cloud VPN tunnelthat connects to the VPC network.
View Service Directory DNS zones
If the prerequisites forautomatic DNS configurationare met, aDNS zone is created with a name in the formatNAMESPACE--REGION.
Console
In the Google Cloud console, go to theCloud DNS zones page.
Look for a private zone with the name
NAMESPACE--REGION.
gcloud
Run the following command to list all private DNS zones:
gcloud dns managed-zones list \ --filter="visibility=private"
Run the following command to get details for a zone with the name
NAMESPACE--REGION.gcloud dns managed-zones describeNAMESPACE--REGION
If the zone is not present,view the details for theendpoint and check if the endpointconfiguration includes a value for the namespace.
If the endpoint has a namespace configuration, seeConfigure aService Directory DNS zone.
If the endpoint does not have a namespace configuration, seeRegister anendpoint withService Directory.
Other ways to configure DNS
If the prerequisites forautomatic DNS configurationare not met, you can create DNS entries in other ways:
If the endpoint has a namespace configured, seeConfigure aService Directory DNS zone.
If the endpoint does not have a namespace configured, seeRegister anendpoint withService Directory.
If you prefer to manually configure DNS, seeConfigure DNSmanually.
Configure a Service Directory DNS zone
If an endpoint is registered withService Directory, but the published service thatit connects to does not have a domain name configured, no DNS changes are made.
If you want to replicate theautomatic DNS configuration,you can manually configure a Service Directory DNS zone that isbacked by the Service Directory namespace. After the zone iscreated, DNS entries for the endpoint areautomatically created.
Create aService Directory DNSzone with thefollowing configuration:
Zone name: Specify
NAMESPACE--REGION,whereNAMESPACEis the namespace that theendpoint is registered to, andREGIONis the region where the endpoint is created.DNS name: The DNS domain that the service producer is using for theirpublished services. Check with the service producer for thisinformation.
The DNS name might have the format
REGION.p.DOMAIN. For example, if theservice producer's public domain isexample.com, and theirpublishedservice is inus-west1, then we recommend that they make their serviceavailable usingus-west1.p.example.comdomain names. Include a trailingdot—for example,us-west1.p.example.com.Service Directory namespace: The namespace that youconfigured for this endpoint.
View the endpoint detailsto find the Service Directory namespace and region.
With this configuration, if you have configured aService Directory DNS zone with theus-west1.p.example.com DNSname, and you create an endpoint with thenameanalytics, a DNS record foranalytics.us-west1.p.example.com isautomatically created.
Register an endpoint with Service Directory
New endpoints are automaticallyregistered with Service Directory. However, if aendpoint was created before automaticregistration with Service Directory was enabled, thisconfiguration might be missing.
You candelete theendpointandcreate a new one, which is registered withService Directory automatically.
Or you can follow these steps to register an existingendpoint with aService Directory namespace.
Create aService Directorynamespacefor the endpoint,
NAMESPACE.Create aService Directoryservicefor the endpoint,
SERVICE_NAME.For the service, use the same name as the name of the forwarding rule usedfor the endpoint,
ENDPOINT_NAME.Create aService Directoryendpoint,using the name
defaultand use the IP address and port (443) of theendpoint.
After you have registered the endpointwith Service Directory, follow the instructions toConfigure aService Directory DNS zone.
Configure DNS manually
If you've prevented automatic DNS configuration, or if it is not enabled in yourconfiguration, you can useCloud DNS to manuallycreate DNS records
For more information, see the following pages:
Access Control: theDNS Administratorrole (
roles/dns.admin) provides thepermissions needed to create DNS zones and records.When you configure a private zone, you provide a DNS name. Use the DNSdomain that the service producer is using for their publishedservices. Check with the service producer for this information.
It might have this format:
REGION.p.DOMAIN. For example, if theservice producer's public domain isexample.com, and their publishedservice is inus-west1, then we recommend that they make their serviceavailable usingus-west1.p.example.comdomain names.
Known issues
Unhealthy backends receive traffic with global access endpoints
It's possible to connect aglobal accessendpoint to a published service that'snot configured for global access. However, health checks don't work correctlyin this configuration. As a result, traffic might be sent to unhealthybackends and dropped.
Only enable global access for an endpoint if you know that the serviceattachment's load balancer is configured for global access.
If your endpoint is affected by this issue, do one of the following:
- If you don't want to use global access,disable global access for your endpoint.
- If you want to use global access, ask the service producer toenable global access for the load balancer's forwarding rule.
Turning off global access for an endpoint doesn't interrupt network traffic forworkloads in the same region as the endpoint. However, after global access isdisabled, clients from other regions can't access the endpoint.
Troubleshooting
Private DNS zone creation fails
When you create an endpoint, aService Directory DNS zone is created. Zone creation can fail forthese reasons:
You haven't enabled the Cloud DNS API in your project.
You don't have the required permissions to create aService Directory DNS zone.
A DNS zone with the same zone name exists in this VPC network.
A DNS zone for the same domain name already exists in this VPCnetwork.
To manually create the Service Directory DNS zone, do thefollowing:
Verify that the Cloud DNS API isenabled in your project.
Verify that you have the required permissions to create theService Directory DNS zone:
dns.managedZones.createdns.networks.bindPrivateDNSZoneservicedirectory.namespaces.associatePrivateZone
If there is a conflicting zone, but it is no longer needed,delete the DNSzone.
Create a Service Directory DNS zone thatis backed by the Service Directory namespace associated with yourendpoint.
Endpoint creation fails when global access is configured
Not all Private Service Connect published services supportendpoints with global access. If you create an endpoint with global access andthe published service doesn't support it, you see this error message:
Private Service Connect global access is not supported for the given forwardingrule, since its producer service does not support consumer global access.
Create the endpoint without the global access option.
Endpoint creation succeeds, but connectivity is not established
If you successfully create an endpoint for published services but connectivityis not established, check the endpoint'sconnection status.The connection status might indicate steps that you can take to resolve theissue.
Propagated connection errors
For information about troubleshooting propagated connections, seeTroubleshoot Private Service Connect connection propagationerrors.
Endpoint has performance issues or connection timeouts
If your endpoint has performance issues or intermittent connection timeouts,it might be due to dropped packets. You can investigate dropped packets bychecking the metrics that are described in the following sections.
Dropped packets to published service
Theprivate_service_connect/consumer/dropped_sent_packets_countmetrictracks packets from a Private Service Connect consumer such asan endpoint to a published service that are dropped because the endpointexceeded itsmaximum connectionsto the service.
If an endpoint reports values for this metric, consider the following solutions:
- Create additional endpoints that connect to the published service.
- Reduce the number of connections through this endpoint.
- Ask the service producer to increase the capacity of their publishedservice—for example, by adding more virtual machine (VM) instances ornetwork endpoints.
Dropped packets from published services
Theprivate_service_connect/consumer/dropped_received_packets_countmetrictracks packets sent from a published service to aPrivate Service Connect consumer such as an endpoint that aredropped because Private Service Connect can't find a matchingconnection for response packets.
Private Service Connect only allows connections that areinitiated from the consumer VPC network. When a consumerinitiates a connection, the connection is tracked in order to matchresponse packets from the published service with an existing connection. IfPrivate Service Connect can't find a match for a response packet,the packet is dropped.
Private Service Connect might not find a match for a responsepacket if a published service sends response packets after a connection hastimed out. If you see values for this metric, contact the service producer.They might be able toconfigure their service to avoid this issue.
Except as otherwise noted, the content of this page is licensed under theCreative Commons Attribution 4.0 License, and code samples are licensed under theApache 2.0 License. For details, see theGoogle Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2026-02-19 UTC.