Cloud Run provides two Cloud Run Admin API versions: v1 and v2. Each version is generally available (GA) and serves a different use case, so v2 does not obsolete v1. To determine which API version works best for you, refer to the following table:
Characteristic | v1 | v2 |
---|---|---|
Release level | Generally available (GA) | Generally available (GA) |
Resources covered | Service, Job, DomainMapping | Service, Job |
API style | Similar to Kubernetes Resource Model | Similar to Google Cloud APIs |
Who should use v1?
You should only use v1 if you need Knative or Kubernetes compatibility. The Service resource of the Cloud Run Admin API v1 is compatible with the Knative Serving API. The v1 Admin API is used when deploying from a YAML file.
Who should use v2?
All other usages should use v2, in particular, anyone making API calls. The Cloud Client Libraries, which are the client libraries recommended by Google, use v2.
What's next
- Learn about available client library options.