Linux Foundation DevOps and Site Reliability CGOA Question # 16 Topic 2 Discussion
CGOA Exam Topic 2 Question 16 Discussion:
Question #: 16
Topic #: 2
You are working on a GitOps project and have made some changes to the cluster using kubectl. What is the recommended approach to ensure that your changes are continuously reconciled?
A.
Delete and recreate the cluster from scratch to ensure a clean and controlled state.
B.
Save those changes to the Desired State store and allow the GitOps controller to attempt reconciliation.
C.
Use kubectl to delete all resources that were changed in the cluster and wait for a reconcile.
D.
Reconcile the changes by running a script or command that synchronizes the cluster with the desired state.
In GitOps,Git is the single source of truth. If changes are made manually in the cluster (viakubectl), those changes will drift from the desired state in Git. To ensure consistency, the correct approach is toupdate the Git repository (Desired State store)so that the reconciler can continuously apply and maintain those changes.
“The desired state must always be declared in Git. Manual changes in the cluster will be overwritten by reconciliation unless they are committed to the Git repository.”
Thus, the correct answer isB.
[References:GitOps Principles (CNCF GitOps Working Group), Drift and Reconciliation Practices., ===========]
Contribute your Thoughts:
Chosen Answer:
This is a voting comment (?). You can switch to a simple comment. It is better to Upvote an existing comment if you don't have anything to add.
Submit