Welcome to ExamTopics
ExamTopics Logo
- Expert Verified, Online, Free.
exam questions

Exam Professional Cloud Developer All Questions

View all questions & answers for the Professional Cloud Developer exam

Exam Professional Cloud Developer topic 1 question 116 discussion

Actual exam question from Google's Professional Cloud Developer
Question #: 116
Topic #: 1
[All Professional Cloud Developer Questions]

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?

  • A. Use the gsutil utility to copy files from within the Docker container at startup, and start the service using an ENTRYPOINT script.
  • B. Create a PersistentVolumeClaim on the GKE cluster. Access the configuration files from the volume, and start the service using an ENTRYPOINT script.
  • C. Use the COPY statement in the Dockerfile to load the configuration into the container image. Verify that the configuration is available, and start the service using an ENTRYPOINT script.
  • D. Add a startup script to the GKE instance group to mount the NFS share at node startup. Copy the configuration files into the container, and start the service using an ENTRYPOINT script.
Show Suggested Answer Hide Answer
Suggested Answer: B 🗳️

Comments

Chosen Answer:
This is a voting comment (?). It is better to Upvote an existing comment if you don't have anything to add.
Switch to a voting comment New
Ksamilosb
Highly Voted 2 years, 9 months ago
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
upvoted 8 times
GCPCloudArchitectUser
2 years, 9 months ago
I am not convinced but it does seem to be best option among all options
upvoted 1 times
...
...
thewalker
Most Recent 4 months, 1 week ago
Selected Answer: B
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.
upvoted 1 times
...
__rajan__
1 year, 2 months ago
Selected Answer: B
B is correct.
upvoted 1 times
...
purushi
1 year, 3 months ago
Selected Answer: B
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.
upvoted 1 times
...
purushi
1 year, 3 months ago
Selected Answer: B
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.
upvoted 1 times
...
jnas
1 year, 4 months ago
Selected Answer: B
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
upvoted 1 times
...
omermahgoub
1 year, 10 months ago
Selected Answer: B
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.
upvoted 1 times
...
telp
1 year, 10 months ago
Selected Answer: B
B is correct using default tools
upvoted 1 times
...
TNT87
1 year, 11 months ago
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
upvoted 1 times
...
zellck
1 year, 11 months ago
Selected Answer: B
B is the answer.
upvoted 1 times
...
tomato123
2 years, 3 months ago
Selected Answer: B
B is correct
upvoted 3 times
...
americoleonardo
2 years, 6 months ago
Selected Answer: B
I think B is more suitable in this situation
upvoted 2 times
...
juancambb
2 years, 9 months ago
B and C are valid, but B use native tools of Kubernetes, so is a best practice and easy to implement.
upvoted 2 times
juancambb
2 years, 9 months ago
answer is B
upvoted 1 times
...
...
assuf
2 years, 10 months ago
vote C
upvoted 4 times
...
Community vote distribution
A (35%)
C (25%)
B (20%)
Other
Most Voted
A voting comment increases the vote count for the chosen answer by one.

Upvoting a comment with a selected answer will also increase the vote count towards that answer by one. So if you see a comment that you already agree with, you can upvote it instead of posting a new comment.

SaveCancel
Loading ...