Free Cloud Engineer: Google Associate Questions and Answers — Questions and Answers
Question 1: You need to move a group of media files totaling more than 50 GB each to Google Cloud Storage. The documents are located in your on-site data center. What kind of relocation strategy might you employ to hasten the transfer process?
- Use parallel uploads to break the file into smaller chunks then transfer it simultaneously (Correct answer)
- Use multi-threaded uploads using the -m option
- Start a recursive upload
- Use the Cloud Transfer Service to transfer
Correct answer: Use parallel uploads to break the file into smaller chunks then transfer it simultaneously
For very large files like 50 GB media files, using parallel uploads significantly speeds up the transfer process to Google Cloud Storage. This strategy breaks the large file into smaller chunks, which are then uploaded simultaneously. By leveraging multiple connections and concurrent transfers, it maximizes available bandwidth and drastically reduces the overall time required compared to a single, sequential upload.
Question 2: Your team uses Splunk for centralized logging, and Splunk logs are the basis for many of your reports and dashboards. Splunk Forwarder must be installed on each node of your new Kubernetes Engine autoscaled cluster. The logs are forwarded to a central Splunk server by the Splunk forwarder. You want to reduce administrative costs. What is the most effective strategy to install Splunk Forwarder throughout the cluster's nodes?
- Use Deployment Manager to orchestrate the deployment of forwarder agents on all nodes
- Include the forwarder agent in a DaemonSet deployment (Correct answer)
- SH to each node and run a script to install the forwarder agent
- Include the forwarder agent in a StatefulSet deployment
Correct answer: Include the forwarder agent in a DaemonSet deployment
A DaemonSet in Kubernetes is designed to ensure that a copy of a pod runs on every node in a cluster. This is the most effective strategy for deploying a logging agent like Splunk Forwarder across all nodes in an autoscaled Kubernetes Engine cluster. It automatically handles the installation on new nodes as they scale up, reducing administrative overhead and ensuring consistent logging coverage without manual intervention.
Question 3: Your team strives to deploy your application to the GKE cluster in the desired state configuration. YAML files represent the Kubernetes deployment and service objects. The replicas parameter in app deployment.yaml specifies that your application is intended to run on two pods. The GKE load balancer is described in the app service. Your service uses YAML. <br> <br> You created the Kubernetes resources by running <br> kubectl apply -f app-deployment.yaml <br> kubectl apply -f app-service.yaml <br> <br> Although your deployment is now handling live traffic, it has performance problems. You would like to make five more replicas. What should you do to update the replicas in the deployed Kubernetes objects currently in use?
- Disregard the YAML file. Enable autoscaling on the deployment to trigger on CPU usage and set max pods to 5. kubectl autoscale myapp --max=5 --cpu-percent=80
- Disregard the YAML file. Use the kubectl scale command to scale the replicas to 5. kubectl scale --replicas=5 -f app-deployment.yaml
- Edit the number of replicas in the YAML file and rerun the kubectl apply. kubectl apply -f app-deployment.yaml (Correct answer)
- Modify the current configuration of the deployment by using kubectl edit to open the YAML file of the current configuration, modify and save the configuration. kubectl edit deployment/app-deployment -o yaml --save-config
Correct answer: Edit the number of replicas in the YAML file and rerun the kubectl apply. kubectl apply -f app-deployment.yaml
The `kubectl apply -f` command is declarative, meaning it applies the desired state defined in the YAML file to your Kubernetes cluster. To update the number of replicas, you should modify the `replicas` parameter directly in your `app-deployment.yaml` file. Rerunning `kubectl apply -f app-deployment.yaml` will then reconcile the cluster's state with the updated YAML, ensuring your infrastructure-as-code remains the single source of truth for your deployment configuration.
Question 4: Every year, auditors visit your teams and request a review of all the prior year's Google Cloud Identity and Access Management (Cloud IAM) policy updates. The analysis and auditing processes have to be streamlined and accelerated. What ought you to do?
- Enable Logging export to Google BigQuery and use ACLs and views to scope the data shared with the auditor (Correct answer)
- Create custom Google Stackdriver alerts and send them to the auditor
- Enable Google Cloud Storage (GCS) log export to audit logs into a GCS bucket and delegate access to the bucket
- Use Cloud Functions to transfer log entries to Google Cloud SQL and use ACLs and views to limit an auditor's view
Correct answer: Enable Logging export to Google BigQuery and use ACLs and views to scope the data shared with the auditor
Exporting Cloud IAM audit logs to Google BigQuery provides a centralized, highly scalable, and queryable repository for historical data. BigQuery's powerful SQL capabilities allow auditors to easily analyze and filter specific IAM policy updates. Furthermore, BigQuery's Access Control Lists (ACLs) and views enable precise control over which data subsets are shared with auditors, streamlining the review process while maintaining data security and compliance.
Question 5: A business plans to move its online application to Google App Engine. They would nonetheless keep using their on-site database. How do they configure the application?
- Setup the application using App Engine Flexible environment with Cloud VPN to connect to database (Correct answer)
- Configure the application using the App Engine Standard environment and Cloud VPN to connect to a database.
- Application setup using App Engine Flexible setting for connecting to databases using Cloud Router
- Create the application using the App Engine Standard environment and connect to the database using Cloud Router
Correct answer: Setup the application using App Engine Flexible environment with Cloud VPN to connect to database
The App Engine Flexible environment allows applications to run in custom runtimes within a Google Cloud Virtual Private Cloud (VPC), providing more network configuration options than the Standard environment. To connect to an on-site database securely, a Cloud VPN tunnel can be established between the Google Cloud VPC and the on-site data center. This setup enables the App Engine Flexible application to access the private on-site database over a secure, private connection.
Question 6: The corporate apps of your client are being moved to the Google Cloud Platform. The security team requests complete visibility into every project within the company. You create your account as the organization administrator and provide the Google Cloud Resource Manager. Which Cloud IAM (Google Cloud Identity and Access Management) roles ought the security team be assigned?
- Org viewer, project viewer (Correct answer)
- Org viewer, project owner
- Project owner, network admin
- Org admin, project browser
Correct answer: Org viewer, project viewer
The security team requires complete visibility into all projects and the organization structure without the ability to make changes. The `Org viewer` role grants read-only access to organization-level resources, while the `Project viewer` role provides read-only access to all resources within projects. Assigning both roles ensures the security team has comprehensive visibility for auditing purposes across the entire GCP organization without granting any modification permissions.
Question 7: Your virtual machines are operating on a network with the subnet mask 255.255.255.240. There are no more available IP addresses on the present subnet, and you need an additional 10 IP addresses for new virtual machines. All current and recent VMs should be able to connect without needing different routes. What ought you to do?
- Delete the subnet, and recreate it using a wider range of IP addresses
- Use gcloud to expand the IP range of the current subnet (Correct answer)
- Create a new subnet with the same starting IP but a wider range to overwrite the current subnet
- reate a new project. Use Shared VPC to share the current network with the new project
Correct answer: Use gcloud to expand the IP range of the current subnet
To add more IP addresses to an existing subnet without disrupting current virtual machines or requiring new routing configurations, the most efficient method is to expand the subnet's IP range. Google Cloud allows you to expand the primary IP range of a subnet using the `gcloud` command-line tool. This operation seamlessly adds more available IP addresses to the subnet while preserving existing configurations and connectivity for all VMs.
You need to move a group of media files totaling more than 50 GB each to Google Cloud Storage.
The documents are located in your on-site data center.
What kind of relocation strategy might you employ to hasten the transfer process?