ExamGecko
Question list
Search
Search

List of questions

Search

Related questions











Question 138 - Professional Cloud DevOps Engineer discussion

Report
Export

Your company runs applications in Google Kubernetes Engine (GKE) that are deployed following a GitOps methodology.

Application developers frequently create cloud resources to support their applications. You want to give developers the ability to manage infrastructure as code, while ensuring that you follow Google-recommended practices. You need to ensure that infrastructure as code reconciles periodically to avoid configuration drift. What should you do?

A.
Install and configure Config Connector in Google Kubernetes Engine (GKE).
Answers
A.
Install and configure Config Connector in Google Kubernetes Engine (GKE).
B.
Configure Cloud Build with a Terraform builder to execute plan and apply commands.
Answers
B.
Configure Cloud Build with a Terraform builder to execute plan and apply commands.
C.
Create a Pod resource with a Terraform docker image to execute terraform plan and terraform apply commands.
Answers
C.
Create a Pod resource with a Terraform docker image to execute terraform plan and terraform apply commands.
D.
Create a Job resource with a Terraform docker image to execute terraforrm plan and terraform apply commands.
Answers
D.
Create a Job resource with a Terraform docker image to execute terraforrm plan and terraform apply commands.
Suggested answer: A

Explanation:

The best option to give developers the ability to manage infrastructure as code, while ensuring that you follow Google-recommended practices, is to install and configure Config Connector in Google Kubernetes Engine (GKE).

Config Connector is a Kubernetes add-on that allows you to manage Google Cloud resources through Kubernetes. You can use Config Connector to create, update, and delete Google Cloud resources using Kubernetes manifests. Config Connector also reconciles the state of the Google Cloud resources with the desired state defined in the manifests, ensuring that there is no configuration drift1.

Config Connector follows the GitOps methodology, as it allows you to store your infrastructure configuration in a Git repository, and use tools such as Anthos Config Management or Cloud Source Repositories to sync the configuration to your GKE cluster. This way, you can use Git as the source of truth for your infrastructure, and enable reviewable and version-controlled workflows2.

Config Connector can be installed and configured in GKE using either the Google Cloud Console or the gcloud command-line tool. You need to enable the Config Connector add-on for your GKE cluster, and create a Google Cloud service account with the necessary permissions to manage the Google Cloud resources. You also need to create a Kubernetes namespace for each Google Cloud project that you want to manage with Config Connector3.

By using Config Connector in GKE, you can give developers the ability to manage infrastructure as code, while ensuring that you follow Google-recommended practices. You can also benefit from the features and advantages of Kubernetes, such as declarative configuration, observability, and portability4.

1: Overview | Artifact Registry Documentation | Google Cloud

2: Deploy Anthos on GKE with Terraform part 1: GitOps with Config Sync | Google Cloud Blog

3: Installing Config Connector | Config Connector Documentation | Google Cloud

4: Why use Config Connector? | Config Connector Documentation | Google Cloud

asked 18/09/2024
Anirban Ganguly
48 questions
User
Your answer:
0 comments
Sorted by

Leave a comment first