Skip to content
Talk to us

Service Directory

Register services and their endpoints in namespaces, and resolve them by name.

22Supported2Not testedof 24 methods

Control plane only: endpoints aren't health-checked, registered automatically or sent traffic.

Requests go to $VERA_ENDPOINT/_gcp/servicedirectory/v1/. Namespaces live in a region, such as us-central1, not in global. For gcloud, add this override to the shared setup:

Terminal window
export CLOUDSDK_API_ENDPOINT_OVERRIDES_SERVICEDIRECTORY="$VERA_ENDPOINT/_gcp/servicedirectory/"

Register a service with one endpoint, then resolve it.

Terminal window
gcloud service-directory namespaces create example-ns --location=us-central1
gcloud service-directory services create example-svc \
--namespace=example-ns --location=us-central1
gcloud service-directory endpoints create example-ep \
--service=example-svc --namespace=example-ns --location=us-central1 \
--address=10.0.0.5 --port=8080
gcloud service-directory services resolve example-svc \
--namespace=example-ns --location=us-central1 --format=json

The last command prints the service and its endpoints. The uid values differ on every run.

Output
{
"service": {
"endpoints": [
{
"address": "10.0.0.5",
"name": "projects/example-project/locations/us-central1/namespaces/example-ns/services/example-svc/endpoints/example-ep",
"port": 8080,
"uid": "95fb9a6575444c6e9f82268df6afbaec"
}
],
"name": "projects/example-project/locations/us-central1/namespaces/example-ns/services/example-svc",
"uid": "946c83e16e8f416f85664c9510d042d8"
}
}

Deleting the namespace also deletes its service and endpoint:

Terminal window
gcloud service-directory namespaces delete example-ns --location=us-central1 --quiet
  • Namespaces, services and endpoints, with labels, annotations, addresses, ports and update masks validated.
  • Endpoint networks in the documented projects/PROJECT_NUMBER/locations/global/networks/NAME form. As in Google Cloud, the network doesn’t have to exist.
  • Resolving a service to its endpoints, with endpointFilter and maxEndpoints.
  • Filters, ordering and page tokens on every list, following the documented grammar.
  • IAM policies on namespaces and services.
  • Cloud DNS zones bound to namespaces.
  • v1beta1 requests, which Terraform’s google-beta provider and gcloud beta service-directory use.
  • No traffic or health checks. Endpoints are stored and resolved through the API only, and no DNS records are created from them.
  • asia-southeast3. Namespaces can be created there, but locations.get answers 404 for it and locations.list leaves it out.
  • Beta-only features. On v1beta1, workloads and beta-only fields, such as a service’s displayName, hostname or owners or an endpoint’s fqdn, answer 501 Not Implemented.
  • IAM isn’t enforced, and attaching a network needs no permission.
  • Deleting a network leaves endpoints alone: they keep the reference.

Measured 2 November 2026 against recorded Google Cloud responses. What the statuses mean

namespaces

8 methods · 1 not tested
MethodStatusNotes
createSupportedUse a region, not global.
getSupported
listSupported
patchSupportedRequires updateMask.
deleteSupportedAlso deletes its services and endpoints.
getIamPolicySupported
setIamPolicySupported
testIamPermissionsNot tested

services

9 methods · 1 not tested
MethodStatusNotes
createSupported
getSupported
listSupported
patchSupportedRequires updateMask.
deleteSupported
resolveSupportedHonors endpointFilter and maxEndpoints.
getIamPolicySupported
setIamPolicySupported
testIamPermissionsNot tested

endpoints

5 methods
MethodStatusNotes
createSupportedThe network doesn't have to exist, as in Google Cloud.
getSupported
listSupported
patchSupportedRequires updateMask.
deleteSupported

locations

2 methods
MethodStatusNotes
getSupportedAnswers 404 for asia-southeast3.
listSupported42 regions.