nerdexam
Google

PROFESSIONAL-CLOUD-DEVELOPER · Question #133

You have containerized a legacy application that stores its configuration on an NFS share. You need to deploy this application to Google Kubernetes Engine (GKE) and do not want the application…

The correct answer is B. Create a PersistentVolumeClaim on the GKE cluster. Access the configuration files from the. GKE supports NFS-backed PersistentVolumes via a PersistentVolumeClaim (PVC). By mounting the NFS share as a PVC, the application pod can read configuration files directly from it at startup. Combined with a readiness probe (or an init container), GKE will not route traffic to…

Deploying applications

Question

You have containerized a legacy application that stores its configuration on an NFS share. You need to deploy this application to Google Kubernetes Engine (GKE) and do not want the application serving traffic until after the configuration has been retrieved. What should you do?

Options

  • AUse the gsutil utility to copy files from within the Docker container at startup, and start the service
  • BCreate a PersistentVolumeClaim on the GKE cluster. Access the configuration files from the
  • CUse the COPY statement in the Dockerfile to load the configuration into the container image.
  • DAdd a startup script to the GKE instance group to mount the NFS share at node startup. Copy the

How the community answered

(20 responses)
  • A
    5% (1)
  • B
    80% (16)
  • C
    10% (2)
  • D
    5% (1)

Explanation

GKE supports NFS-backed PersistentVolumes via a PersistentVolumeClaim (PVC). By mounting the NFS share as a PVC, the application pod can read configuration files directly from it at startup. Combined with a readiness probe (or an init container), GKE will not route traffic to the pod until it signals that startup-including config retrieval-is complete, satisfying the 'no traffic until ready' requirement. Option A misapplies gsutil, which is for Cloud Storage buckets, not NFS shares. Option C (Dockerfile COPY) would bake the config into the image, requiring a rebuild whenever config changes and breaking the NFS-based workflow. Option D (instance group startup script) operates at the node level, outside Kubernetes abstractions, and would not reliably synchronize with pod scheduling.

Topics

#Kubernetes Persistent Storage#GKE Volumes#NFS Integration#Application Deployment

Community Discussion

No community discussion yet for this question.

Full PROFESSIONAL-CLOUD-DEVELOPER Practice