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

Unlimited Access

Get Unlimited Contributor Access to the all ExamTopics Exams!
Take advantage of PDF Files for 1000+ Exams along with community discussions and pass IT Certification Exams Easily.

Exam Professional Cloud Architect topic 1 question 67 discussion

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

You have a Python web application with many dependencies that requires 0.1 CPU cores and 128 MB of memory to operate in production. You want to monitor and maximize machine utilization. You also want to reliably deploy new versions of the application. Which set of steps should you take?

  • A. Perform the following: 1. Create a managed instance group with f1-micro type machines. 2. Use a startup script to clone the repository, check out the production branch, install the dependencies, and start the Python app. 3. Restart the instances to automatically deploy new production releases.
  • B. Perform the following: 1. Create a managed instance group with n1-standard-1 type machines. 2. Build a Compute Engine image from the production branch that contains all of the dependencies and automatically starts the Python app. 3. Rebuild the Compute Engine image, and update the instance template to deploy new production releases.
  • C. Perform the following: 1. Create a Google Kubernetes Engine (GKE) cluster with n1-standard-1 type machines. 2. Build a Docker image from the production branch with all of the dependencies, and tag it with the version number. 3. Create a Kubernetes Deployment with the imagePullPolicy set to 'IfNotPresent' in the staging namespace, and then promote it to the production namespace after testing.
  • D. Perform the following: 1. Create a GKE cluster with n1-standard-4 type machines. 2. Build a Docker image from the master branch with all of the dependencies, and tag it with 'latest'. 3. Create a Kubernetes Deployment in the default namespace with the imagePullPolicy set to 'Always'. Restart the pods to automatically deploy new production releases.
Show Suggested Answer Hide Answer
Suggested Answer: B 🗳️

Comments

Chosen Answer:
This is a voting comment (?) , you can switch to a simple comment.
Switch to a voting comment New
jcmoranp
Highly Voted 4 years, 5 months ago
C is correct, need "ifnotpresent"when uploads to container registry
upvoted 39 times
medi01
1 year ago
ifnotpresent won't pull new version.
upvoted 3 times
...
heretolearnazure
8 months ago
yes i agree
upvoted 1 times
...
...
TosO
Highly Voted 4 years, 5 months ago
C is the best choice. You can create a k8s cluster with just one node and use a different namespaces for staging and production. In staging, you will test the changes
upvoted 22 times
AzureDP900
1 year, 6 months ago
Agreed
upvoted 1 times
...
...
krokskan
Most Recent 1 month, 3 weeks ago
Selected Answer: B
B because Kubernetes will be overkill and A is not reliable
upvoted 1 times
...
Gall
2 months, 2 weeks ago
Selected Answer: C
A is wrong as after the restart the script will be rerun and fetch the code directly from the repo (even if production). The load of the massive number of dependencies will take a lot of timee, and the application version will be fuzzy.
upvoted 1 times
...
moumou
2 months, 4 weeks ago
C is correct, B (instance template cannote be updated once created.
upvoted 1 times
...
kip21
3 months, 1 week ago
C - Correct
upvoted 1 times
...
AWS_Sam
3 months, 2 weeks ago
The correct answer is C. Because it is the only option that RELIABLY tests the app in staging before it is applied to production. Remember that one of the requirements in the question is to reliably deploy the app.
upvoted 1 times
...
Roro_Brother
4 months, 1 week ago
Selected Answer: A
You don't need GKE for 0.1 CPU, only A meet hte needs
upvoted 3 times
...
MahAli
4 months, 2 weeks ago
Selected Answer: A
For 0.1 CPU I will never use GKE, considering the associated cost with control plane and not even one option in the question mentioning micro instances for the node pool
upvoted 4 times
...
mastrrrr
5 months ago
Selected Answer: A
When we read the question - "0.1 CPU cores and 128 MB of memory" to operate in production. You want to monitor and "maximize machine utilization"... Answer A should be a fit based on the question details. Would GKE for tiny application be overkill?
upvoted 4 times
...
Arun_m_123
6 months, 2 weeks ago
Selected Answer: C
python app on compute engine is a disastrous architecture. C is the correct architecture which tests the app before putting to prod
upvoted 1 times
...
AdityaGupta
6 months, 2 weeks ago
Selected Answer: C
You should use GKE, because your can scale up and down based on your demand. Also you can specifiy the resource size like 0.1 CPU and 128 MB of memory per Pod. Secondly, Kubernetes Deployment with the imagePullPolicy set to “IfNotPresent” in the staging namespace, and then promote it to production namespace after testing. is best practice.
upvoted 6 times
A21325412
5 months, 2 weeks ago
Ref: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/ Correct. Because we can spec the resources on our pods is why C is chosen over A (f1-micro). This is what allows us to "maximize machine utilization"!
upvoted 2 times
...
...
ghitesh
8 months, 1 week ago
Selected Answer: A
f1 micro managed instance group fits all the requirements, with capability to run upto 2 instances per per for given requirement GKE cluster would be an overkill, with control plane nodes/cost not even being considered. n1-standard-1 instance would require 10 application instances/pod to be running (assuming 0 ds) and would still be leaving 75% memory unused
upvoted 8 times
...
red_panda
10 months, 3 weeks ago
Selected Answer: C
C without doubts
upvoted 2 times
Rothmansua
10 months ago
How about price for a 0.1 CPU app?
upvoted 1 times
...
...
LaxmanTiwari
11 months, 2 weeks ago
C – 1. Create GKE cluster with n1-standard-1 type machine. 2. Build a docker image from production branch with all the dependencies and tag it with version #. 3. Create a Kubernetes Deployment with the imagePullPolicy set to “IfNotPresent” in the staging namespace, and then promote it to production namespace after testing. Pretty interesting questions, where all options physically work, though C corresponds mostly to all requirements. First of all why GKE, but not GCE? Because, GKE can better utilize resources (pods autoscaling on the same node), and also it has advanced dashboard for resource utilization. Also, GKE abstracts you from VM/OS – focus just on app. Then C or D? C - follows Kubernetes best practices (uses normal image version #, instead of marking as "latest"), and also image is deployed automatically by node agent (kubelet), after test is passed in staging env (Google Best practice). In D version is marked as latest , which would sophisticate roll-back process. In Addition with “Always” policy you need to restart pods manually to deploy new version. upvoted 7 times
upvoted 5 times
...
JC0926
1 year ago
Selected Answer: C
C. Perform the following: 1. Create a Google Kubernetes Engine (GKE) cluster with n1-standard-1 type machines. 2. Build a Docker image from the production branch with all of the dependencies, and tag it with the version number. 3. Create a Kubernetes Deployment with the imagePullPolicy set to 'IfNotPresent' in the staging namespace, and then promote it to the production namespace after testing. This option provides the best solution for monitoring and maximizing machine utilization and reliably deploying new versions of the application. Using a GKE cluster allows you to take advantage of Kubernetes' features for scaling, rolling updates, and self-healing. Additionally, building a Docker image with all dependencies ensures a consistent environment, and promoting from the staging namespace to the production namespace after testing ensures that new releases are reliable.
upvoted 3 times
amelm
11 months, 2 weeks ago
ChatGPT answer 😂
upvoted 2 times
LaxmanTiwari
10 months, 3 weeks ago
don't rely too much on chatGPT
upvoted 3 times
...
...
...
Badri9898
1 year ago
-> B This option is the best solution because it satisfies the requirements mentioned in the question. A managed instance group with n1-standard-1 type machines is a good choice for a Python web application with many dependencies that require 0.1 CPU cores and 128 MB of memory to operate in production. Building a Compute Engine image with all the dependencies and automatically starting the Python app simplifies the deployment process, and allows for consistent and reliable deployment of new versions. Rebuilding the Compute Engine image and updating the instance template to deploy new production releases ensures that the latest version is always deployed. Additionally, monitoring can be done using Stackdriver Monitoring to maximize machine utilization.
upvoted 5 times
kaes
9 months, 2 weeks ago
It's not possible to update the instance template, you have to create the new one "Instance templates are designed to create instances with identical configurations. So you cannot update an existing instance template or change an instance template after you create it." https://cloud.google.com/compute/docs/instance-templates#how_to_update_instance_templates
upvoted 2 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 ...