My Journey into GitOps: Why I Stopped Using kubectl and Started Using Git

Apurva GargoteApurva Gargote
3 min read

When I started working with Kubernetes, my go-to command was:

kubectl apply -f deployment.yaml

That’s how I used to deploy apps to the cluster.
Simple. Manual. Repetitive. Sometimes risky.

But as things scaled more environments, more services, more people - I realized:

There has to be a better way.

And I found it: GitOps.


💡 What Is GitOps (Made Simple)?

GitOps is a way to manage your Kubernetes deployments using Git.

Instead of applying changes manually with kubectl, you:

  • Push your config files to a Git repository

  • A tool (like ArgoCD or Flux) watches that repo

  • And automatically applies those changes to your cluster

Think of it like this:

"If it’s not in Git, it doesn’t exist."

Git becomes your source of truth - and everything is automated from there.


🚫 Problems I Faced Before GitOps

Here’s what went wrong when I was deploying with kubectl:

  1. No History
    I couldn't see who changed what or when. No audit trail.

  2. Manual Mistakes
    Accidentally applied the wrong config in production

  3. No Rollback
    If something failed, I had to manually fix and re-apply.

  4. Drift Between Environments
    Dev and Prod weren’t always in sync, because I forgot to update both.


✅ What Changed After Switching to GitOps

I started using ArgoCD - a GitOps tool that connects your Git repo to your Kubernetes cluster.

Now my workflow looks like this:

  1. I push my YAML changes to GitHub

  2. ArgoCD sees the new commit

  3. It automatically updates the app on the cluster

  4. If something goes wrong? I revert the Git commit and ArgoCD rolls back too

So simple. So powerful.


🔧 What is ArgoCD?

ArgoCD is a GitOps tool that:

  • Connects to your Git repository

  • Monitors changes

  • Automatically syncs your Kubernetes cluster with what’s in Git

It even has a web dashboard where I can:

  • See which apps are deployed

  • Check if the cluster is in sync with Git

  • Roll back deployments with one click

It made managing K8s feel… less scary. 😄



🔄 Real Benefits I Saw

After moving to GitOps:

  • Team members could review infra changes like normal code

  • No more "it worked on dev but not in prod"

  • Fewer accidents, because everything was reviewed and versioned

  • Rollbacks became fast and safe (just git revert!)


🧠 My Take: Why GitOps Is the Future

  • Git is already familiar to every developer

  • It gives us history, version control, and collaboration

  • And when paired with tools like ArgoCD or Flux it makes Kubernetes automatic, reliable, and safe


🔚 Final Thoughts

I stopped using kubectl apply every day
Not because it's bad but because GitOps is just better.

  • More visibility

  • Less risk

  • Easier teamwork

  • And full control over what’s running where

If you're managing multiple environments or working with teams GitOps is 100% worth it.

1
Subscribe to my newsletter

Read articles from Apurva Gargote directly inside your inbox. Subscribe to the newsletter, and don't miss out.

Written by

Apurva Gargote
Apurva Gargote

👨‍💻 Last-year student diving deep into DevOps, Cloud Engineering, and Infrastructure Automation. Passionate about building scalable, efficient, and secure systems. Let’s connect and build something amazing! 🚀