You deploy a container image to Google Cloud Run with the default settings. What happens when the container crashes repeatedly during startup?
Think about how Cloud Run handles transient failures to keep services available.
Cloud Run automatically retries starting the container multiple times to handle transient startup failures before marking the service as unavailable.
You want to deploy a container on GKE and pass environment variables to it. Which YAML snippet correctly sets environment variables in the container spec?
apiVersion: v1
kind: Pod
metadata:
name: env-test
spec:
containers:
- name: test-container
image: gcr.io/my-project/my-image
env:
- name: VAR1
value: "value1"
- name: VAR2
value: "value2"Look for the correct Kubernetes container environment variable syntax.
Kubernetes uses the env field with a list of name and value pairs to set environment variables in containers.
You want to deploy a new version of your container image on Cloud Run and gradually shift 30% of traffic to it while keeping 70% on the old version. Which approach achieves this?
Cloud Run supports traffic splitting natively between revisions.
Cloud Run allows traffic splitting between revisions of the same service, enabling gradual rollout of new versions.
You want to restrict access to your private container images in GCR so only a specific Cloud Run service can pull them. What is the best way to do this?
Think about IAM roles and permissions for accessing GCR images.
Granting the Cloud Run service's service account the 'Storage Object Viewer' role on the GCR bucket allows it to pull private images securely.
You want to minimize deployment time and cost when building and deploying container images to Cloud Run. Which practice is most effective?
Consider how build caching affects build speed and cost.
Using Cloud Build caching reuses unchanged layers, reducing build time and cost before deploying to Cloud Run.