Chapters
Try It For Free
March 26, 2026

6 Actionable GitOps Best Practices to Help You Get Started | Harness Blog

  • GitOps best practices help you move from ad‑hoc scripts to predictable, automated delivery driven entirely from Git.

  • Start small with one application, automate deployments, then standardize patterns and governance as you scale.

  • Combine GitOps with strong security, observability, and policy-as-code to safely support many teams and environments.

GitOps is a new and promising way to deploy software and manage infrastructure. If you follow the best practices, it can go from being a proof of concept to a reliable way to run production. Teams should slowly adopt GitOps, starting with automated deployments and working their way up to full continuous delivery. Advanced tools, AI-driven verification, and strong governance quickly become necessary as your use grows.

But not everyone knows how this new method works or has used it before. We have put together six GitOps best practices that you can use to get started and prepare for growth, safer releases, and better collaboration between development and operations.

With AI-assisted pipelines, verification, and centralized governance, Harness Continuous Delivery & GitOps builds on this model so teams can ship quickly without putting safety at risk. 

Why GitOps is Important

GitOps isn't just "use Git." It's a way to use Git to control how software and infrastructure change. You don't have to deal with dashboards, custom scripts, and tribal knowledge anymore. You can make changes the same way developers already like to work: with branches, pull requests, reviews, and version history.

What that buys you in the real world:

  • A single, auditable history of every infrastructure and application change.

  • Consistent, declarative configs instead of snowflake environments.

  • Pull-based reconciliation that reduces the need for broad cluster access.

  • Faster, safer rollouts because changes go through the same review/approval process as code.

And here's the part that doesn't get enough attention: GitOps lets your team spend more time on the important things, like shipping features and making things more reliable, instead of putting tools together and fixing bugs.

Foundational GitOps Principles to Align On

Before you roll anything out, make sure everyone’s playing the same game. These principles are the backbone of most GitOps best practices:

  • Git as the single source of truth: All desired state for apps and infrastructure lives in version control.

  • Declarative configuration: You describe what the system should look like, not how to get there.

  • Automated reconciliation: Tools like Argo CD or Flux continuously compare desired vs. actual state and fix drift.

  • Pull-based delivery: Agents close to the infrastructure pull approved changes, instead of CI pushing with big credentials.

  • Continuous delivery mindset: Every merged change can be deployed, and the system is designed for frequent, small updates.

When you align on these early, the rest of your choices, repo layout, promotions, and approvals become way easier to keep consistent.

Getting Started With GitOps

For businesses that have been using DevOps principles for a while, GitOps may be a natural next step. But if you're new to GitOps, the best thing to do is start small and work your way up.

To get ready for GitOps in a Kubernetes context:

  1. Host your application and infrastructure code in a source control system like GitHub, GitLab, or Bitbucket.

  2. Standardize on Kubernetes as your deployment target (managed or self-hosted).

  3. Choose a GitOps engine like Argo CD to reconcile Git state into your clusters.

  4. Define a simple, declarative manifest for one service and its environment configuration.

The next step is to find the GitOps tool or platform that will help your business reach its goals. Then, figure out how these tools will work together in the context of your workflow.

As you experiment, document everything:

  • Which repos you created and why.
  • How you modeled environments (branches, folders, or separate repos).
  • How your GitOps tool connects to your clusters and repos.

You may want to replicate this approach in the future, or share these steps with someone else to try. Documentation will ensure that other people understand what you're doing and how GitOps can work for them, too. From there, it's time to deploy.

Best Practices to Keep in Mind While Leveraging GitOps

GitOps is exciting, but getting started can be way easier if you take these simple, actionable factors into account. The following six gitops best practices will help you lay a strong foundation and avoid common scaling pitfalls.

Make GitOps a Part of Your Company's Culture

You need the right attitude from everyone in the company for GitOps to work. One of the biggest mistakes companies make when they start using GitOps is not telling everyone who is involved in the process about it and why they are doing it. It may seem like a small thing, but if you skip this step, you will fail.

You have 20 people on your team, and 5 of them are in charge of running automation scripts. If these five people don't know what GitOps is, they won't be able to do the automated deployment right. This can make people angry, cause mistakes, and waste a lot of time. Make sure everyone is on the same page by having regular training sessions for your developers on how to do GitOps the right way at your company.

To create a long-lasting GitOps culture:

  • Define clear ownership: Clearly state who owns the app repos, the infrastructure repos, and the GitOps configuration.

  • Make review processes the same: Treat changes to infrastructure like code by having peer reviews, approvals, and automated checks.

  • Put money into enablement: Hold internal workshops on GitOps workflows, tools like Argo CD, and how to fix problems.

  • Celebrate small wins: Start with one or two services, show that releases are faster and safer, and use that success to get more people to use them.

Start Small and Gradually Get Bigger

Once you know that GitOps will work for your company, it's time to move forward slowly. Starting small is the best way to get started with GitOps, no matter how much you already know about automation, orchestration, and containerization technologies. You don't have to start with a complicated setup and try to automate everything. Instead, start using basic GitOps methods like Continuous Delivery and automated deployment.

You can set up a simple Kubernetes cluster on any cloud provider, sync your Git repo with the infrastructure, and start with a simple Nginx server. This is how you will learn how things work.

A practical phased rollout could look like this:

  • Phase 1: One service, one environment: Use a single cluster and one Git repo to understand the end-to-end flow.

  • Phase 2: Multiple environments: Introduce staging and production, and decide how you’ll promote changes between them.

  • Phase 3: Multiple services: Apply the same patterns to additional services, reusing templates and modules where possible.

  • Phase 4: Multiple clusters and regions: Only once patterns feel repeatable should you expand GitOps across clusters and geographies.

At each scaling phase, complexity jumps considerably, and additional orchestration and management may be needed. A common failure pattern is to assume that what works in phase one can simply be done “bigger” and will work in phases three or four.

Platforms like Harness CD & GitOps provide “deploy anywhere” capabilities across Kubernetes and traditional environments, which simplifies this expansion when you’re ready.

Start Automating Deployments

One of the goals of using GitOps is to make deployments automatic. This means that whenever a change happens in Git, a deployment happens at as a result without any human intervention. This makes it a much more reliable, predictable, and repeatable way to send code changes and updates to production. CI/CD tools are the best way to automate this. 

But first, you need to know how these tools work and what kinds of tasks they can do before you automate them. Some CI/CD tools are all about automating deployment, while others aren't as focused on deployment. But they will still let you automate many important tasks for a healthy GitOps workflow, like setting up configurations and compiling code.

When you connect CI and GitOps, you should aim for:

  • Build and test pipelines that run automatically every time there is a change.

  • Git-based promotion flows, like a pull request that updates an environment config repo when a build is successful.

  • For production deployments, there should be no "click ops". Merging to the right branch or directory should be all it takes.

Harness CI can help here with capabilities like Test Intelligence, build analytics and insights, and incremental builds, which shorten feedback loops before changes ever reach your GitOps repos.

Do Continuous Delivery With GitOps

One of the main ideas behind GitOps is Continuous Delivery. The goal is to have a production environment that is always ready for deployment and can handle new code releases. With Continuous Delivery, you can work on new features faster because you know they will be available as soon as they are finished. 

Harness CD is a powerful tool that can help you do this job without any problems. The development team can deploy their code to the production environment as many times as they want without affecting anyone else. You also don't have to worry about downtime or service interruptions because every time you make a new change, all of the old ones are automatically rolled back.

To get Continuous Delivery to work well with GitOps best practices:

  • Make small changes often so that rollbacks and root-cause analysis are easy to handle.

  • Use progressive delivery methods like blue/green or canary to lower the risk as new versions come out.

  • Check logs and metrics, not just Kubernetes health, to make sure deployments are always working.

Standardize the GitOps Approach

As your company's GitOps implementation gets more advanced, you need to make sure that everyone is on the same page by standardizing some things. One important thing to think about is how to make changes to the cluster or infrastructure. After that, you need to choose between GitOps' pull and push methods. It is usually best not to push anything directly to the main or master branch. Instead, it is highly recommended to use the pull method so that a pull request can serve as an application to ensure that your changes move through the workflow in a safe and orderly manner. Also, the focus on automation. Automating tasks that can be done over and over again without any help from people.

Standardization stops "GitOps sprawl" as it spreads to more teams. Focus on:

  • Repository structure: Choose how to separate the code for your app from the settings for your environment (for example, by using separate repos or environment folders).

  • For GitOps repos: Use trunk-based development with short-lived feature branches and quick merges.

  • Policies for pull requests: Before changes can be made to production configs, they must be reviewed, checked automatically, and passed through status gates.

  • Templates and modules that can be used again: Offer shared Helm charts, Kustomize bases, or pipeline templates that follow best practices.

Enterprise platforms like Harness CD provide powerful pipelines, DevOps pipeline governance (powered by OPA), and visualizations of DevOps data so you can apply consistent standards without limiting team autonomy.

Use Best-of-Breed Tools

GitOps is easy to set up and speeds up software deployment with the help of popular tools like FluxCD, Argo CD, and Jenkins X. There are also platforms like Harness GitOps and the open-source Argo CD GitOps approach that make GitOps very easy. These platforms also offer extra benefits like high security, visibility, and an advanced dashboard.

When evaluating GitOps tooling, look for:

  • Use pull-based, declarative delivery tools like Argo CD and Flux instead of imperative push-only scripts.

  • For deployment health checks, it works well with your observability stack.

  • Policy-as-code and RBAC to keep environments safe as more people use them.

  • Multi-cluster visibility lets teams see what's running where without having to log into a lot of dashboards.

Harness GitOps builds on Argo CD and adds an enterprise control plane with centralized visibility, audit trails, OPA-based governance, and release orchestration, so you can keep using the open-source tools you like, while managing them at scale from one place.

Scaling GitOps Safely: Security, Policy, and Governance

Security and governance are not optional add-ons; they are core GitOps best practices when multiple teams and environments are involved. Consider:

  • Branch protection and mandatory reviews for environment repos, especially production.

  • Role-based access control (RBAC) so only authorized personas can approve or trigger sensitive changes.

  • Policy-as-code with OPA to enforce rules like “no direct deploys to production,” or “only approved container registries are allowed.”

  • Comprehensive audit trails so you can answer “who changed what, when, and why” during incidents or audits.

Harness Policy as Code and DevOps pipeline governance let you define these policies centrally and apply them consistently across GitOps pipelines, without turning the platform team into a bottleneck.

Observability, Verification, and Rollbacks in GitOps

Another critical gitops best practices area is how you validate and roll back changes:

  • Connect deployments to metrics and logs so you see the impact of each release in real time.

  • Automate deployment verification against SLIs/SLOs instead of relying only on pod health.

  • Make rollbacks one-click or fully automated when anomalies are detected.

Adopt GitOps Best Practices, Safely and Incrementally

GitOps is getting popular because it's easy to use, set up, and learn. It suits Kubernetes and developer-centric ways of working. Even though it's still a relatively new idea, many developers are already using it.

By following these GitOps best practices, starting small, automating deployments, standardizing patterns, picking the right tools, and putting money into security and observability, you can create a workflow where every change can be tracked, tested, and safely deployed from Git.

Harness CD & GitOps can be the control plane that connects your repos, clusters, and teams into one governed, observable delivery system if you're ready to go from early experiments to a reliable, enterprise-ready GitOps model.

GitOps Best Practices: Frequently Asked Questions (FAQs)

Here are some of the most common questions to help you apply GitOps best practices in real-world environments, from choosing tools and repo structures to managing security, observability, and scale.

What does GitOps mean in simple terms?

In GitOps, Git is the only place where you can find the correct information about how your application and infrastructure are set up. Tools like Argo CD constantly compare the desired state stored in Git with your runtime environments. This means that any change you make in Git is automatically applied to your clusters.

What are the main differences between GitOps best practices and general DevOps best practices?

DevOps is a big culture and set of ways of working together and automating things. GitOps is more specific because it uses Git, declarative configs, and automated reconciliation to follow DevOps principles. It focuses on versioned infrastructure, pull-based deployments, and strong auditability.

Do I need to have Kubernetes to use GitOps?

Most GitOps implementations today are aimed at Kubernetes, but the main ideas: Git as the source of truth, declarative state, and automated reconciliation, can be used with other platforms and infrastructure-as-code tools. You can still use OpenTofu or other IaC tools in a similar way to Kubernetes if you haven't already.

How should I set up my GitOps repos?

Putting app code and environment configuration in separate repos or using separate environment directories within a single config repo are two common patterns. What matters most is consistency and clear ownership. The best choice depends on the limits of your team and your compliance needs.

How does GitOps deal with security and rules?

GitOps makes security better by putting all changes in Git, which lets people review them and keep track of them. To automatically enforce rules across environments, you should use this with branch protection, RBAC, secrets management outside of Git, and policy-as-code (for example, OPA).

What tools do I need to follow GitOps best practices?

You will need at least Git hosting, a GitOps engine like Argo CD or Flux, CI pipelines to build and test artifacts, and tools to see what is happening with deployments. Platforms like Harness CD and GitOps can bring all of these features together and add new ones like AI-assisted verification, policy-as-code, and cross-cluster visibility to your current ecosystem.

Eric Minick

Eric Minick is an internationally recognized expert in software delivery with experience in Continuous Delivery, DevOps, and Agile practices, working as a developer, marketer, and product manager. Eric is the co-author of “AI Native Software Delivery” (O’Reilly) and is cited or acknowledged in the books “Continuous Integration,” “Agile Conversations,” and “Team Topologies.” Today, Eric works on the Harness product management team to bring its solutions to market. Eric joined Harness from CodeLogic, where he was Head of Product.

Similar Blogs

Harness Platform