Introduction to GitOps

Some of Kubernetes main advantages are its declarative resource model and the controllers' reconciliation loops. This allows you to define the desired state of your cluster, and the controllers attempt to bring the actual system environment in line with your defined configuration.

While kubectl and tools like k9s and Lens are great for viewing the state of your cluster resources and making on-the-fly changes to them, when it comes to actually configuring things and defining the state of your cluster, there are better alternatives.

Let's say you want to know who made which changes and when (traceability and auditing).

Enter the GitOps realm!

Compared to alternative approaches such as manual configuration management or imperative scripting, GitOps stands out for its transparent, auditable, and automated deployment process. It tracks and applies changes automatically, minimizing human error and ensuring dependable deployments.

Following IaC principles, GitOps enables systematic and repeatable infrastructure configurations. This speeds up development cycles and better integrates with other DevOps tools and practices, making it an ideal fit for modern cloud-native environments.

Given that Syself Autopilot primarily interfaces with the Kubernetes API, you're free to pick any GitOps tool of your preference. Both Argo CD and Flux stand out as reputed tools that work seamlessly with Autopilot.

Architecture

The GitOps tool responsible for continuous deployment will be installed in the workload cluster, with the Autopilot management cluster being added as an external destination. This configuration allows the GitOps tool to make changes to the resources within Autopilot, ensuring that the workload cluster matches the desired state defined in a Git repository. This is possible even for a previously created workload cluster, so you can bootstrap your cluster by manually applying it to Autopilot and then pass the baton to your GitOps tool for ongoing management.

The guides will cover the steps for basic installation and configuration of ArgoCD (Flux to come soon) to guarantee the best integration of these tools with Autopilot. After the installation steps, we'll explain, in an opinionated way, how you can achieve a completely self-managed setup.

Previous
Using local storage in bare metal
Next
Using Argo CD