Google Professional Cloud DevOps Engineer Question 213
Select 3Google Cloud PlatformYour team is tasked with deploying and managing a GKE cluster for a production environment. To ensure consistency and reliability, you decide to apply CI/CD practices to automate infrastructure provisioning and updates to the cluster. Which of the following practices should you implement to achieve this goal?
- A
Use Infrastructure as Code (IaC) tools like Terraform to define and version-control the GKE cluster configuration.
- B
Manually apply configuration changes to the GKE cluster using the
kubectlcommand-line tool whenever necessary. - C
Establish a CI/CD pipeline that integrates with the IaC tool to automatically apply validated changes to the GKE cluster.
- D
Store sensitive credentials for the GKE cluster, such as API keys, directly within the CI/CD pipeline's configuration files for easy access.
- E
Implement automated testing in the CI/CD pipeline to validate infrastructure changes before applying them to the production GKE cluster.
Show answer and explanation
Correct answers: A, C, E
Explanation
Applying CI/CD practices to infrastructure, such as GKE clusters, involves using IaC tools to define configurations, automating deployment processes with CI/CD pipelines, and incorporating automated testing to validate changes. This approach ensures reliability, consistency, and security while minimizing human error. Avoiding manual changes and insecure practices like exposing sensitive credentials is critical to maintaining the integrity of the infrastructure.
- A. Correct.
Using Infrastructure as Code (IaC) tools like Terraform is a foundational practice in CI/CD for managing infrastructure. It ensures that the configuration is version-controlled and can be reliably reproduced.
- B. Incorrect.
Manually applying changes using
kubectlis error-prone and does not align with CI/CD practices, as it lacks automation and consistency. - C. Correct.
Integrating IaC tools with CI/CD pipelines enables automated application of validated changes, ensuring consistency and reducing the risk of human error.
- D. Incorrect.
Storing sensitive credentials directly in CI/CD configuration files is a security risk and violates best practices. Sensitive data should be managed securely, such as using Secret Manager or encrypted environment variables.
- E. Correct.
Automated testing in the CI/CD pipeline ensures that infrastructure changes are validated and do not cause unintended issues before being deployed to production.