Professional Cloud Developer Exam QuestionsBrowse all questions from this exam

Professional Cloud Developer Exam - Question 116


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?

Show Answer
Correct Answer: B,D

To ensure the application does not serve traffic until the configuration has been retrieved, the most appropriate solution is to create a PersistentVolumeClaim (PVC) on the GKE cluster. This method allows the application to access the configuration files stored on the NFS share directly from the volume. By using an ENTRYPOINT script, you can ensure that the service starts only after the configuration files have been properly accessed, providing a seamless and scalable approach for configuration management within Kubernetes. Additionally, this approach utilizes Kubernetes-native tools which enhance robustness and flexibility.

Discussion

14 comments
Sign in to comment
KsamilosbOption: B
Feb 20, 2022

It's not necessary to mount NFS to each node in GKE. Just create PVC point to shared NFS, mount to container, and use configuration in ENTRYPOINT. Vote B

GCPCloudArchitectUser
Feb 26, 2022

I am not convinced but it does seem to be best option among all options

assufOption: C
Jan 7, 2022

vote C

tomato123Option: B
Aug 20, 2022

B is correct

juancambbOption: B
Feb 28, 2022

B and C are valid, but B use native tools of Kubernetes, so is a best practice and easy to implement.

juancambb
Feb 28, 2022

answer is B

americoleonardoOption: B
May 20, 2022

I think B is more suitable in this situation

zellckOption: B
Dec 20, 2022

B is the answer.

TNT87
Dec 28, 2022

https://kubernetes.io/docs/concepts/storage/persistent-volumes/#access-modes https://cloud.google.com/filestore/docs/accessing-fileshares https://cloud.google.com/storage/docs/gcs-fuse

telpOption: B
Jan 7, 2023

B is correct using default tools

omermahgoubOption: B
Jan 11, 2023

B and D are the main candidate answers Option B: allows the application to be stateless and have no dependencies on the filesystem of the host. D: is a good solution since it allows the application to access its configuration as soon as the application starts, without having to copy the configuration files into the container. But the best option is B, because it allows the application to be stateless and have no dependencies on the filesystem of the host. This approach is more flexible, makes it easy to update the configuration files, and reduces the size of the container image.

jnasOption: B
Jul 19, 2023

https://cloud.google.com/kubernetes-engine/docs/concepts/persistent-volumes. PersistentVolume resources are used to manage durable storage in a cluster. In GKE, a PersistentVolume is typically backed by a persistent disk. You can also use other storage solutions like NFS. Filestore is a NFS solution on Google Cloud

purushiOption: B
Aug 5, 2023

With PersisentVolumeClaim object, we can claim the volume what we need dynamically. The storage class will be defined by network administrator. Container/Pod needs to wait until it reads configuration from the mounted volume before serving traffic to its clients.

purushiOption: B
Aug 5, 2023

B is more formal and standardized way to mount NFS onto the worker node compared to A where it asks us to create a startup script to mount the volume.

RajanOption: B
Sep 21, 2023

B is correct.

thewalkerOption: B
Jul 19, 2024

The best answer here is B. Create a PersistentVolumeClaim on the GKE cluster. Access the configuration files from the volume and start the service using an ENTRYPOINT script. [1] Here's why: PersistentVolumeClaim (PVC): A PVC is the Kubernetes way to request storage. By creating a PVC that points to your NFS share, you ensure that your pods have access to the configuration files. This approach is more robust and scalable than copying files at startup. ENTRYPOINT Script: An ENTRYPOINT script is the ideal way to handle the startup logic. You can use it to: Mount the PVC volume. Verify that the configuration files are present. Start your application's main process.