Automated Change Deployment
Learn how automated agents apply changes to GitOps managed systems.
Applying changes through automation
In GitOps, changes made to the system's desired state in Git are automatically applied to the system by automated agents. When correctly implementing a GitOps approach, automated agents become the only tool capable of changing the system. This principle simplifies the end-to-end workflow to introduce new changes that execute the following three steps in order:
Changes are committed to Git that update the system's desired state.
Automated agents running inside the system pull the desired state from Git.
Automated agents apply changes to the system to match the desired state.
For development and operations teams, making a change to the system is reduced to the act of performing a commit. Once the commit is made to adjust the desired state, automation performs the remaining work to apply the changes to the system.
Automated agents
We previously used an approach where changes were manually applied to a Kubernetes cluster using kubectl
. Since this approach violates GitOps principles, let’s change our approach to deploy changes to the cluster. In this exercise, we'll revisit a previous scenario to discover how automated agents help us deploy changes to a Kubernetes cluster without executing commands manually.
About the cluster
In the interactive widget below, there's example project that we've been working with throughout the course. However, in this example, a GitOps tool named Flux will be installed and configured on the Kubernetes cluster within the interactive widget when it's launched. Flux provides developers with an implementation of the GitOps pattern that can be used to keep clusters in sync with a system's desired state. Within the interactive widget, Flux is preconfigured to automatically apply changes we commit to the system's desired state in GitHub to the Kubernetes cluster.
Launch the exercise
To get started, launch the interactive widget by clicking the "Run" button. When launched, the interactive widget will start a Kubernetes cluster with Flux installed and configured. Once the cluster is ready, we can inspect its runtime state by executing the following command in the terminal of the interactive widget:
Get hands-on with 1200+ tech skills courses.