Topic 1 Question 67
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?
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.
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.
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.
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.
ユーザの投票
コメント(17)
C is correct, need "ifnotpresent"when uploads to container registry
👍 38jcmoranp2019/10/26C 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
👍 21TosO2019/11/23Answer is C:
To monitor and maximize machine utilization, reliably deploy new versions of the application, and ensure that the application has the required 0.1 CPU cores and 128 MB of memory to operate in production, you should perform the following steps:
Create a Google Kubernetes Engine (GKE) cluster with n1-standard-1 type machines. These machines have 1 CPU core and 3.75 GB of memory, which should be sufficient to run the application and provide some additional resources for other processes.
Build a Docker image from the production branch with all of the dependencies, and tag it with the version number. This will allow you to easily deploy new versions of the application by building a new image with the updated code and dependencies.
Create a Kubernetes Deployment with the imagePullPolicy set to 'IfNotPresent' in the staging namespace. This will allow you to test the new version of the application in a staging environment before deploying it to production. After testing, you can promote the Deployment to the production namespace to deploy the new version to production.
👍 7omermahgoub2022/12/21
シャッフルモード