You have a Dockerfile to deploy on Google Kubernetes Engine. What steps should you take?
Choose an answer
Tap an option to check your answer.
Correct answer: Build a Docker image from the Dockerfile, push it to Container Registry, create a Deployment YAML referencing that image, and use kubectl to create the Deployment..
Why this is the answer
To deploy an application defined by a Dockerfile to Google Kubernetes Engine (GKE), you must first build a Docker image from that Dockerfile. This image then needs to be stored in a registry that GKE can access, such as Google Container Registry (GCR) or Artifact Registry. Once the image is pushed, you create a Kubernetes Deployment manifest (YAML file) that specifies this image and its location. Finally, you use the kubectl apply -f command to create the Deployment resource on your GKE cluster, which will then pull the image and run your application. Incorrect options: kubectl app deploy . is not a valid kubectl command. gcloud app deploy . is used for deploying applications to Google App Engine, not GKE. Uploading the Docker image to Cloud Storage is incorrect because Cloud Storage is an object storage service, not an image registry for Kubernetes. Kubernetes requires images to be pulled from a container registry.
Pass your exam — without the endless answer hunt
Get every verified question and explanation for this exam in one place, and save hours of prep. 1,000+ certifications · 20+ languages · free to start.
Pass your exam faster → No card needed