Google Cloud Associate Cloud Engineer — Question 271
You are planning to migrate a database and a backend application to a Standard Google Kubernetes Engine (GKE) cluster. You need to prevent data loss and make sure there are enough nodes available for your backend application based on the demands of your workloads. You want to follow Google-recommended practices and minimize the amount of manual work required. What should you do?
Answer options
- A. Run your database as a StatefulSet. Configure cluster autoscaling to handle changes in the demands of your workloads.
- B. Run your database as a single Pod. Run the resize command when you notice changes in the demands of your workloads.
- C. Run your database as a DaemonSet. Run the resize command when you notice changes in the demands of your workloads.
- D. Run your database as a Deployment. Configure cluster autoscaling to handle changes in the demands of your workloads.
Correct answer: A
Explanation
The correct answer is A because running the database as a StatefulSet allows for stable storage and identity, which is essential for maintaining data integrity during migration. Options B and C are inadequate as they do not provide the necessary data persistence and do not support automatic scaling efficiently. Option D, while it supports autoscaling, does not provide the stable storage features needed for a database.