Skip to content

gcloud

gcloud uses the REST API, which lowtide serves on the same TLS port as gRPC.

Terminal window
gcloud config set api_endpoint_overrides/pubsub https://lowtide.pubsub.svc/

For a private CA:

Terminal window
gcloud config set core/custom_ca_certs_file /path/to/lowtide-ca.crt

After that, gcloud pubsub topics, subscriptions and snapshots commands work as usual, including publish, pull and seek. With Cloud IAM authorization on, add-iam-policy-binding, remove-iam-policy-binding and get-iam-policy work too: lowtide forwards them to the shadow resource with your credentials.

Terminal window
gcloud pubsub topics create orders --project acme
gcloud pubsub subscriptions create orders-billing --topic orders --project acme
gcloud pubsub topics publish orders --message hello --project acme
gcloud pubsub subscriptions pull orders-billing --auto-ack --project acme
Terminal window
gcloud config unset api_endpoint_overrides/pubsub

The override applies to every Pub/Sub command in the active gcloud configuration. To keep Pub/Sub and lowtide apart, use a separate configuration:

Terminal window
gcloud config configurations create lowtide
gcloud config set api_endpoint_overrides/pubsub https://lowtide.pubsub.svc/
gcloud config configurations activate default # back to Pub/Sub

Or override a single command with CLOUDSDK_API_ENDPOINT_OVERRIDES_PUBSUB=https://lowtide.pubsub.svc/ gcloud pubsub ....

gcloud pubsub schemas commands: lowtide does not serve schemas. See Compatibility.