Skip to contentমূল লেখায় যান

Topic 05 · DevOps & Cloudটপিক 05 · DevOps & Cloud

GitOps

This page explains GitOps for a tester: the four OpenGitOps principles, how Argo CD and Flux keep a cluster in line with a Git repository, what that means for the version that you test and for changes made by hand, and where smoke tests fit. It builds on CI/CD Pipelines; the Kubernetes pages of this module explain the cluster side.

10 min read10 মিনিটে পড়া যায় · 7 sections7টি সেকশন · 8 sources8টি সোর্স · updated Nov 2026আপডেট: Nov 2026

Git is the truth, the cluster followsGit-ই সত্য, ক্লাস্টার তাকে অনুসরণ করে

Push a change to Git, then edit the cluster by hand, and watch Argo CD react to each setting.Git-এ একটা পরিবর্তন push করুন, তারপর হাতে ক্লাস্টার বদলান, আর দেখুন প্রতিটা সেটিংয়ে Argo CD কী করে।

3 min3 মিনিট7 steps7টি ধাপ
  • Differencesপার্থক্য0 / 3
  • Statusঅবস্থাSynced
CI pipelineCI পাইপলাইনcompareতুলনাsyncসিঙ্কGitGitdesiredকাঙ্ক্ষিতArgo CDArgo CDcontrollerকন্ট্রোলারClusterক্লাস্টারliveলাইভSyncedSyncedDeployment v1Deployment v1Deployment v1Deployment v1ConfigMap v1ConfigMap v1ConfigMap v1ConfigMap v1Service v1Service v1Service v1Service v1

You’ll learnআপনি শিখবেন

  • Git is the source of truthGit-ই সত্যের উৎস✓
  • What OutOfSync meansOutOfSync মানে কী
  • What automated sync doesঅটোমেটেড সিঙ্ক কী করে
  • Why deleted manifests stayমোছা manifest কেন থেকে যায়
  • What self-heal doesসেলফ-হিল কী করে

What it is

OpenGitOps is a set of open-source standards, best practices, and community-focused education that helps organizations adopt a structured, standardized approach to implementing GitOps Source 1সোর্স 1. Flux describes GitOps as a way of managing infrastructure and applications so that the whole system is described declaratively and version controlled, with an automated process that makes the deployed environment match the state in one or more Git repositories Source 4সোর্স 4.

The four principles. OpenGitOps names four principles Source 1সোর্স 1:

PrincipleWhat it says
DeclarativeA system managed by GitOps must have its desired state expressed declaratively Source 1সোর্স 1
Versioned and ImmutableDesired state is stored in a way that enforces immutability, versioning and retains a complete version history Source 1সোর্স 1
Pulled AutomaticallySoftware agents automatically pull the desired state declarations from the source Source 1সোর্স 1
Continuously ReconciledSoftware agents continuously observe actual system state and attempt to apply the desired state Source 1সোর্স 1

Two tools. Two GitOps tools for Kubernetes are Argo CD, a declarative, GitOps continuous delivery tool Source 2সোর্স 2, and Flux, a tool for keeping Kubernetes clusters in sync with sources of configuration (like Git repositories) Source 3সোর্স 3.

সহজ English

OpenGitOps is a set of open-source standards, best practices, and education for the community. It helps organizations adopt a structured, standard way to do GitOps Source 1সোর্স 1. Flux describes GitOps like this: the whole system is described declaratively, kept under version control, and an automatic process makes the running environment match what one or more Git repositories say Source 4সোর্স 4.

The four principles. OpenGitOps names four principles Source 1সোর্স 1:

PrincipleWhat it says
DeclarativeThe desired state of the system must be written down declaratively Source 1সোর্স 1
Versioned and ImmutableThe desired state is stored so that it is immutable and versioned, and it keeps its whole history Source 1সোর্স 1
Pulled AutomaticallySoftware agents fetch the desired state from the source by themselves Source 1সোর্স 1
Continuously ReconciledSoftware agents keep watching the actual state of the system and try to apply the desired state Source 1সোর্স 1

Two tools. Two GitOps tools for Kubernetes are Argo CD, a declarative, GitOps continuous delivery tool Source 2সোর্স 2, and Flux, a tool for keeping Kubernetes clusters in sync with sources of configuration, like Git repositories Source 3সোর্স 3.

বাংলা ব্যাখ্যা

OpenGitOps হলো open-source standard, best practice আর কমিউনিটি-কেন্দ্রিক শিক্ষার একটা সংগ্রহ। এটা organization-কে GitOps বাস্তবায়নের একটা structured, standard পদ্ধতি নিতে সাহায্য করে Source 1সোর্স 1। Flux-এর বর্ণনায় GitOps হলো infrastructure আর application পরিচালনার এমন একটা উপায়, যেখানে পুরো system declaratively বর্ণনা করা আর version control-এ রাখা থাকে, আর একটা automated process নিশ্চিত করে যে deploy করা environment এক বা একাধিক Git repository-তে লেখা state-এর সাথে মেলে Source 4সোর্স 4।

চারটা নীতি। OpenGitOps চারটা নীতির নাম দেয় Source 1সোর্স 1:

নীতিকী বলে
DeclarativeGitOps দিয়ে পরিচালিত একটা system-এর desired state অবশ্যই declaratively প্রকাশ করা থাকতে হবে Source 1সোর্স 1
Versioned and ImmutableDesired state এমনভাবে রাখা হয়, যাতে immutability ও versioning নিশ্চিত হয় এবং একটা সম্পূর্ণ version history থাকে Source 1সোর্স 1
Pulled AutomaticallySoftware agent source থেকে ঘোষণা করা desired state নিজে থেকেই pull করে Source 1সোর্স 1
Continuously ReconciledSoftware agent system-এর actual state ক্রমাগত দেখতে থাকে এবং desired state প্রয়োগ করার চেষ্টা করে Source 1সোর্স 1

দুটো tool। Kubernetes-এর জন্য দুটি GitOps tool হলো Argo CD, একটা declarative, GitOps continuous delivery tool Source 2সোর্স 2, এবং Flux, এমন একটা tool যা Kubernetes cluster-কে configuration-এর source-এর (যেমন Git repository) সাথে sync-এ রাখে Source 3সোর্স 3।

How it works

The loop. Argo CD uses Git repositories as the source of truth for the desired application state Source 2সোর্স 2. It is a Kubernetes controller that continuously monitors running applications and compares the live state with the desired target state in the Git repository Source 2সোর্স 2. An application whose live state deviates from the target state is OutOfSync Source 2সোর্স 2. Argo CD reports and visualizes the differences, and it can sync the live state back to the desired state automatically or manually Source 2সোর্স 2.

No push to the cluster. With automated sync, CI/CD pipelines no longer need direct access to the Argo CD API server to deploy Source 6সোর্স 6. Instead, the pipeline commits and pushes the changed manifests to the Git repository that Argo CD tracks Source 6সোর্স 6.

Flux, too, keeps Kubernetes clusters in sync with sources of configuration, like Git repositories Source 3সোর্স 3. Here is the whole loop of Argo CD Source 2সোর্স 2, with a pipeline that pushes to Git Source 6সোর্স 6:

you or a CI pipeline --- commit and push --->  Git repository  (desired state)
                                                     ^
                                                     |  watch and compare
                                         Argo CD, in the cluster
                                                     |
                                                     v  sync when OutOfSync
                                              Kubernetes cluster  (live state)

Three settings that matter.

SettingDefaultWhat it does
Automated syncOff: a new application shows Sync Policy: <none> Source 5সোর্স 5. Turn it on with argocd app set <APPNAME> --sync-policy automated Source 6সোর্স 6Syncs an application when Argo CD detects differences between the manifests in Git and the live state Source 6সোর্স 6
Self-healOffStarts an automated sync when the live cluster's state deviates from the state in Git. Without it, changes made to the live cluster do not trigger an automated sync Source 6সোর্স 6
PruneOffDeletes resources that are no longer defined in Git. By default, as a safety mechanism, automated sync does not delete them Source 6সোর্স 6

Hooks. Sync phases and hooks decide when resources are applied, such as before or after the main sync operation Source 7সোর্স 7. The argocd.argoproj.io/hook annotation assigns a resource to a phase Source 7সোর্স 7:

HookWhen it runs
PreSyncBefore the manifests are applied Source 7সোর্স 7
SyncAfter all PreSync hooks succeeded, at the same time as the manifests are applied Source 7সোর্স 7
PostSyncAfter all Sync hooks succeeded, the application succeeded, and all resources are Healthy Source 7সোর্স 7
SyncFailWhen the sync operation fails Source 7সোর্স 7

Hooks can be any kind of Kubernetes resource, but they tend to be a Pod, a Job, or an Argo Workflow Source 7সোর্স 7.

Flux. In Flux, a Source defines where the repository with the desired state is, and how to get it, such as credentials and version selectors Source 4সোর্স 4. Examples are GitRepository, OCIRepository, HelmRepository, and Bucket Source 4সোর্স 4. A Kustomization is a set of Kubernetes resources that Flux reconciles in the cluster Source 4সোর্স 4. Reconciliation means making sure that a given state matches a desired state that is declared somewhere, such as a Git repository Source 4সোর্স 4.

সহজ English

The loop. Argo CD treats Git repositories as the source of truth for how an application should be Source 2সোর্স 2. It runs in Kubernetes as a controller. It keeps watching the running applications and compares what is running with what the Git repository says Source 2সোর্স 2. When they differ, the application is OutOfSync Source 2সোর্স 2. Argo CD shows the differences, and it can make the cluster match Git again, by itself or when you ask Source 2সোর্স 2.

No push to the cluster. With automated sync, a CI/CD pipeline does not need direct access to the Argo CD server to deploy Source 6সোর্স 6. The pipeline commits and pushes the changed files to the Git repository that Argo CD watches Source 6সোর্স 6.

Flux also keeps Kubernetes clusters in sync with sources of configuration, like Git repositories Source 3সোর্স 3. Here is the whole loop of Argo CD Source 2সোর্স 2, with a pipeline that pushes to Git Source 6সোর্স 6:

you or a CI pipeline --- commit and push --->  Git repository  (desired state)
                                                     ^
                                                     |  watch and compare
                                         Argo CD, in the cluster
                                                     |
                                                     v  sync when OutOfSync
                                              Kubernetes cluster  (live state)

Three settings that matter.

SettingDefaultWhat it does
Automated syncOff: a new application shows Sync Policy: <none> Source 5সোর্স 5. Turn it on with argocd app set <APPNAME> --sync-policy automated Source 6সোর্স 6Syncs an application by itself when Git and the cluster differ Source 6সোর্স 6
Self-healOffStarts an automated sync when the cluster no longer matches Git. Without it, changes made in the cluster do not start an automated sync Source 6সোর্স 6
PruneOffDeletes things that are no longer in Git. By default, for safety, automated sync does not delete them Source 6সোর্স 6

Hooks. Sync phases and hooks decide when things are applied, for example before or after the main sync Source 7সোর্স 7. The argocd.argoproj.io/hook annotation puts a resource in a phase Source 7সোর্স 7:

HookWhen it runs
PreSyncBefore the files are applied Source 7সোর্স 7
SyncAfter all PreSync hooks passed, at the same time as the files are applied Source 7সোর্স 7
PostSyncAfter all Sync hooks passed, the application succeeded, and everything is Healthy Source 7সোর্স 7
SyncFailWhen the sync fails Source 7সোর্স 7

A hook can be any kind of Kubernetes resource, but it is usually a Pod, a Job, or an Argo Workflow Source 7সোর্স 7.

Flux. In Flux, a Source says where the repository with the desired state is, and how to get it, for example credentials and which version Source 4সোর্স 4. Examples are GitRepository, OCIRepository, HelmRepository, and Bucket Source 4সোর্স 4. A Kustomization is a set of Kubernetes resources that Flux keeps in line in the cluster Source 4সোর্স 4. Reconciliation means making sure that what runs matches the desired state written somewhere, such as a Git repository Source 4সোর্স 4.

বাংলা ব্যাখ্যা

চক্রটা। Argo CD Git repository-কে application-এর desired state-এর source of truth হিসেবে ব্যবহার করে Source 2সোর্স 2। এটা একটা Kubernetes controller, যেটা চলমান application-গুলো ক্রমাগত দেখে আর live state-কে Git repository-তে লেখা desired target state-এর সাথে তুলনা করে Source 2সোর্স 2। যে application-এর live state target state থেকে সরে যায়, সেটা OutOfSync Source 2সোর্স 2। Argo CD পার্থক্যগুলো রিপোর্ট করে ও দেখায়, আর live state-কে automatically বা manually আবার desired state-এ sync করতে পারে Source 2সোর্স 2।

cluster-এ push নয়। automated sync থাকলে deploy করার জন্য CI/CD pipeline-এর Argo CD API server-এ সরাসরি access লাগে না Source 6সোর্স 6। তার বদলে pipeline বদলানো manifest Argo CD যে Git repository track করে সেখানে commit আর push করে Source 6সোর্স 6।

Flux-ও Kubernetes cluster-কে configuration-এর source-এর (যেমন Git repository) সাথে sync-এ রাখে Source 3সোর্স 3। এই হলো Argo CD-র পুরো চক্র Source 2সোর্স 2, Git-এ push করা একটা pipeline-সহ Source 6সোর্স 6:

you or a CI pipeline --- commit and push --->  Git repository  (desired state)
                                                     ^
                                                     |  watch and compare
                                         Argo CD, in the cluster
                                                     |
                                                     v  sync when OutOfSync
                                              Kubernetes cluster  (live state)

তিনটা গুরুত্বপূর্ণ setting।

SettingDefaultকী করে
Automated syncবন্ধ: নতুন application-এ Sync Policy: <none> দেখায় Source 5সোর্স 5। চালু করতে argocd app set <APPNAME> --sync-policy automated Source 6সোর্স 6Git-এর manifest আর live state-এ পার্থক্য পেলে Argo CD application sync করে Source 6সোর্স 6
Self-healবন্ধlive cluster-এর state Git-এর state থেকে সরে গেলে automated sync শুরু করে। এটা না থাকলে live cluster-এ করা change automated sync চালু করে না Source 6সোর্স 6
Pruneবন্ধGit-এ আর নেই এমন resource মুছে দেয়। default-ভাবে, নিরাপত্তার জন্য, automated sync এগুলো মোছে না Source 6সোর্স 6

Hook। sync phase আর hook ঠিক করে resource কখন apply হবে, যেমন মূল sync-এর আগে বা পরে Source 7সোর্স 7। argocd.argoproj.io/hook annotation একটা resource-কে একটা phase-এ রাখে Source 7সোর্স 7:

Hookকখন চলে
PreSyncmanifest apply হওয়ার আগে Source 7সোর্স 7
Syncসব PreSync hook সফল হওয়ার পর, manifest apply হওয়ার সাথে একই সময়ে Source 7সোর্স 7
PostSyncসব Sync hook সফল হওয়ার পর, application সফল হলে, আর সব resource Healthy হলে Source 7সোর্স 7
SyncFailsync operation ফেল করলে Source 7সোর্স 7

hook যেকোনো ধরনের Kubernetes resource হতে পারে, তবে সাধারণত Pod, Job বা Argo Workflow হয় Source 7সোর্স 7।

Flux। Flux-এ Source বলে desired state-ওয়ালা repository কোথায়, আর সেটা পেতে কী লাগে, যেমন credential আর version selector Source 4সোর্স 4। উদাহরণ: GitRepository, OCIRepository, HelmRepository আর Bucket Source 4সোর্স 4। Kustomization হলো Kubernetes resource-এর একটা সেট, যেটা Flux cluster-এ reconcile করে Source 4সোর্স 4। Reconciliation মানে নিশ্চিত করা যে একটা state কোথাও (যেমন একটা Git repository-তে) declaratively লেখা desired state-এর সাথে মেলে Source 4সোর্স 4।

Try it

This walk-through follows the Argo CD Getting Started guide Source 5সোর্স 5. It needs a Kubernetes cluster. On a local computer, kind or minikube can run one Source 8সোর্স 8; kind requires Docker or Podman Source 8সোর্স 8. You also need the kubectl command-line tool and a kubeconfig file (by default ~/.kube/config) Source 5সোর্স 5. If you cannot run a cluster yet, read along.

1. Install Argo CD. This creates the argocd namespace, where all the Argo CD services and application resources live Source 5সোর্স 5:

kubectl create namespace argocd
kubectl apply -n argocd --server-side --force-conflicts -f https://raw.githubusercontent.com/argoproj/argo-cd/stable/manifests/install.yaml

2. Install the CLI. Download the latest version from the Argo CD releases on GitHub, or use Homebrew Source 5সোর্স 5:

brew install argocd

3. Log in. Set the default namespace of kubectl to argocd, then use argocd login --core Source 5সোর্স 5:

kubectl config set-context --current --namespace=argocd
argocd login --core

4. Create an application from a Git repository. Argo CD's example repository has a guestbook application Source 5সোর্স 5:

argocd app create guestbook --repo https://github.com/argoproj/argocd-example-apps.git --path guestbook --dest-server https://kubernetes.default.svc --dest-namespace default
argocd app get guestbook

The application starts as OutOfSync, because it is not deployed yet and no Kubernetes resources were created Source 5সোর্স 5.

5. Sync it. argocd app sync guestbook gets the manifests from the repository and runs a kubectl apply of them Source 5সোর্স 5. Then you can see the application's resources, logs, events, and health status Source 5সোর্স 5.

argocd app sync guestbook
argocd app get guestbook

6. Optional: open the web UI. kubectl port-forward connects to the API server without exposing the service, and the API server can then be accessed at https://localhost:8080 Source 5সোর্স 5. To use the UI, open that address in a browser and log in Source 5সোর্স 5. The initial password of the admin user is shown by argocd admin initial-password -n argocd Source 5সোর্স 5. The default installation has a self-signed certificate Source 5সোর্স 5.

kubectl port-forward svc/argocd-server -n argocd 8080:443
argocd admin initial-password -n argocd

সহজ English

This walk-through follows the Argo CD Getting Started guide Source 5সোর্স 5. It needs a Kubernetes cluster. On a local computer, kind or minikube can run one Source 8সোর্স 8. kind needs Docker or Podman Source 8সোর্স 8. You also need the kubectl tool and a kubeconfig file (by default ~/.kube/config) Source 5সোর্স 5. If you cannot run a cluster yet, just read along.

1. Install Argo CD. This makes the argocd namespace, where all the Argo CD services and application resources live Source 5সোর্স 5:

kubectl create namespace argocd
kubectl apply -n argocd --server-side --force-conflicts -f https://raw.githubusercontent.com/argoproj/argo-cd/stable/manifests/install.yaml

2. Install the CLI. Download the latest version from the Argo CD releases on GitHub, or use Homebrew Source 5সোর্স 5:

brew install argocd

3. Log in. Set kubectl to use the argocd namespace, then run argocd login --core Source 5সোর্স 5:

kubectl config set-context --current --namespace=argocd
argocd login --core

4. Create an application from a Git repository. Argo CD's example repository has a guestbook application Source 5সোর্স 5:

argocd app create guestbook --repo https://github.com/argoproj/argocd-example-apps.git --path guestbook --dest-server https://kubernetes.default.svc --dest-namespace default
argocd app get guestbook

The application starts as OutOfSync, because it is not deployed yet and nothing was created in Kubernetes Source 5সোর্স 5.

5. Sync it. argocd app sync guestbook gets the files from the repository and applies them with kubectl apply Source 5সোর্স 5. Then you can see the application's parts, logs, events, and health Source 5সোর্স 5.

argocd app sync guestbook
argocd app get guestbook

6. Optional: open the web UI. kubectl port-forward connects you to the API server without opening it to others. Then the API server is at https://localhost:8080 Source 5সোর্স 5. To use the UI, open that address in a browser and log in Source 5সোর্স 5. argocd admin initial-password -n argocd shows the first password of the admin user Source 5সোর্স 5. The default installation uses a self-signed certificate Source 5সোর্স 5.

kubectl port-forward svc/argocd-server -n argocd 8080:443
argocd admin initial-password -n argocd

বাংলা ব্যাখ্যা

এই walk-through Argo CD-র Getting Started guide অনুসরণ করে Source 5সোর্স 5। এর জন্য একটা Kubernetes cluster লাগে। নিজের computer-এ kind বা minikube একটা cluster চালাতে পারে Source 8সোর্স 8; kind-এর জন্য Docker বা Podman লাগে Source 8সোর্স 8। সাথে kubectl command-line tool আর একটা kubeconfig ফাইল লাগে (default-ভাবে ~/.kube/config) Source 5সোর্স 5। এখনো cluster চালাতে না পারলে শুধু পড়ে যান।

১. Argo CD install করুন। এটা argocd namespace বানায়, যেখানে Argo CD-র সব service আর application resource থাকে Source 5সোর্স 5:

kubectl create namespace argocd
kubectl apply -n argocd --server-side --force-conflicts -f https://raw.githubusercontent.com/argoproj/argo-cd/stable/manifests/install.yaml

২. CLI install করুন। GitHub-এ Argo CD-র release থেকে সর্বশেষ version download করুন, অথবা Homebrew ব্যবহার করুন Source 5সোর্স 5:

brew install argocd

৩. login করুন। kubectl-এর default namespace argocd করুন, তারপর argocd login --core চালান Source 5সোর্স 5:

kubectl config set-context --current --namespace=argocd
argocd login --core

৪. একটা Git repository থেকে application বানান। Argo CD-র উদাহরণ repository-তে একটা guestbook application আছে Source 5সোর্স 5:

argocd app create guestbook --repo https://github.com/argoproj/argocd-example-apps.git --path guestbook --dest-server https://kubernetes.default.svc --dest-namespace default
argocd app get guestbook

application শুরুতে OutOfSync থাকে, কারণ এটা এখনো deploy হয়নি আর কোনো Kubernetes resource তৈরি হয়নি Source 5সোর্স 5।

৫. sync করুন। argocd app sync guestbook repository থেকে manifest এনে সেগুলোর kubectl apply চালায় Source 5সোর্স 5। তারপর application-এর resource, log, event আর health status দেখা যায় Source 5সোর্স 5।

argocd app sync guestbook
argocd app get guestbook

৬. চাইলে web UI খুলুন। kubectl port-forward service বাইরে না খুলেই API server-এ যুক্ত করে, আর তখন API server পাওয়া যায় https://localhost:8080-এ Source 5সোর্স 5। UI ব্যবহার করতে browser-এ ওই address খুলে login করুন Source 5সোর্স 5। admin user-এর প্রথম password দেখায় argocd admin initial-password -n argocd Source 5সোর্স 5। default installation-এ একটা self-signed certificate থাকে Source 5সোর্স 5।

kubectl port-forward svc/argocd-server -n argocd 8080:443
argocd admin initial-password -n argocd

How a tester uses it

Run smoke tests after each sync. You can run smoke tests as PostSync hooks Source 7সোর্স 7. If they succeed, you know that the application passed the validation; if they fail, the whole deployment is marked as failed, and Argo CD can notify you Source 7সোর্স 7. In the same way, an essential check can run as a PreSync hook: if it fails, the whole sync stops, and the deployment does not happen Source 7সোর্স 7.

Hooks tend to be a Pod, a Job, or an Argo Workflow Source 7সোর্স 7. This Job has the shape of the Argo CD example; the image and the command are placeholders for your own test runner. With hook-delete-policy: HookSucceeded, the hook resource is deleted when the sync succeeds Source 7সোর্স 7.

apiVersion: batch/v1
kind: Job
metadata:
  generateName: smoke-test-
  annotations:
    argocd.argoproj.io/hook: PostSync
    argocd.argoproj.io/hook-delete-policy: HookSucceeded
spec:
  template:
    spec:
      containers:
        - name: smoke-test
          image: <your-test-image>
          command: ["<your-smoke-test-command>"]
      restartPolicy: Never
  backoffLimit: 2

Know what is deployed. Git is the source of truth for the desired state Source 2সোর্স 2. The feature list of Argo CD includes audit trails for application events and API calls Source 2সোর্স 2. It can roll back to any application configuration that is committed in the Git repository Source 2সোর্স 2.

See drift. Argo CD detects and shows configuration drift automatically Source 2সোর্স 2. If a test environment does not match Git, it is OutOfSync Source 2সোর্স 2.

Treat a change to an environment like code. Desired state is stored in a way that enforces immutability and versioning, and it keeps a complete version history Source 1সোর্স 1. The tutorial's advice: review a change to the desired state of a test environment the way you review code.

সহজ English

Run smoke tests after each sync. You can run smoke tests as PostSync hooks Source 7সোর্স 7. If they pass, you know that the application passed the check. If they fail, the whole deployment is marked as failed, and Argo CD can tell you Source 7সোর্স 7. In the same way, a key check can run as a PreSync hook. If it fails, the whole sync stops, and nothing is deployed Source 7সোর্স 7.

Hooks tend to be a Pod, a Job, or an Argo Workflow Source 7সোর্স 7. This Job has the shape of the Argo CD example. The image and the command are placeholders for your own test runner. With hook-delete-policy: HookSucceeded, the hook is deleted when the sync succeeds Source 7সোর্স 7.

apiVersion: batch/v1
kind: Job
metadata:
  generateName: smoke-test-
  annotations:
    argocd.argoproj.io/hook: PostSync
    argocd.argoproj.io/hook-delete-policy: HookSucceeded
spec:
  template:
    spec:
      containers:
        - name: smoke-test
          image: <your-test-image>
          command: ["<your-smoke-test-command>"]
      restartPolicy: Never
  backoffLimit: 2

Know what is deployed. Git is the source of truth for the desired state Source 2সোর্স 2. The feature list of Argo CD includes audit trails for application events and API calls Source 2সোর্স 2. It can roll back to any application setup that is committed in Git Source 2সোর্স 2.

See drift. Argo CD finds and shows drift in the setup by itself Source 2সোর্স 2. If a test environment does not match Git, it is OutOfSync Source 2সোর্স 2.

Treat a change to an environment like code. The desired state is stored so that it is immutable and versioned, and it keeps its whole history Source 1সোর্স 1. The tutorial's advice: review a change to the desired state of a test environment the way you review code.

বাংলা ব্যাখ্যা

প্রতিটা sync-এর পর smoke test চালান। smoke test PostSync hook হিসেবে চালানো যায় Source 7সোর্স 7। সফল হলে বোঝা যায় application validation পার হয়েছে; ফেল করলে পুরো deployment ফেল হিসেবে চিহ্নিত হয়, আর Argo CD আপনাকে জানাতে পারে Source 7সোর্স 7। একইভাবে একটা জরুরি check PreSync hook হিসেবে চলতে পারে: সেটা ফেল করলে পুরো sync থেমে যায়, আর deployment হয় না Source 7সোর্স 7।

hook সাধারণত Pod, Job বা Argo Workflow হয় Source 7সোর্স 7। এই Job-টা Argo CD-র উদাহরণের আকারে বানানো; image আর command আপনার নিজের test runner-এর জন্য placeholder। hook-delete-policy: HookSucceeded থাকলে sync সফল হলে hook resource মুছে যায় Source 7সোর্স 7।

apiVersion: batch/v1
kind: Job
metadata:
  generateName: smoke-test-
  annotations:
    argocd.argoproj.io/hook: PostSync
    argocd.argoproj.io/hook-delete-policy: HookSucceeded
spec:
  template:
    spec:
      containers:
        - name: smoke-test
          image: <your-test-image>
          command: ["<your-smoke-test-command>"]
      restartPolicy: Never
  backoffLimit: 2

কী deploy হয়েছে, জানুন। desired state-এর source of truth হলো Git Source 2সোর্স 2। Argo CD-র feature তালিকায় application event আর API call-এর audit trail আছে Source 2সোর্স 2। Git repository-তে commit করা যেকোনো application configuration-এ এটা rollback করতে পারে Source 2সোর্স 2।

drift দেখুন। Argo CD configuration drift নিজে থেকেই খুঁজে বের করে দেখায় Source 2সোর্স 2। একটা test environment Git-এর সাথে না মিললে সেটা OutOfSync Source 2সোর্স 2।

environment-এর change-কে code-এর মতো দেখুন। desired state এমনভাবে রাখা হয় যাতে immutability ও versioning নিশ্চিত হয়, আর পুরো version history থাকে Source 1সোর্স 1। টিউটোরিয়ালের পরামর্শ: test environment-এর desired state-এর change code-এর মতো করেই review করুন।

Common mistakes

  • Changing a test environment by hand. With self-heal, Argo CD syncs the cluster back when its state deviates from Git Source 6সোর্স 6. Without self-heal, such a change does not trigger a sync Source 6সোর্স 6, and the application shows as OutOfSync Source 2সোর্স 2. Change the Git repository instead.
  • Expecting deleted manifests to disappear. By default, automated sync does not delete resources that are no longer defined in Git Source 6সোর্স 6. A manual sync with pruning can always delete them Source 6সোর্স 6.
  • Waiting for a retry of a failed sync. Automated sync tries once for each combination of commit and application parameters, and it does not try again when the last attempt against the same commit and parameters failed Source 6সোর্স 6. Push the fix as a new commit, or set a retry policy: Argo CD can retry a failed sync with exponential backoff Source 6সোর্স 6.
  • Planning a rollback with automated sync on. Rollback cannot be performed against an application with automated sync enabled Source 6সোর্স 6.
  • Expecting hooks in a selective sync. Hooks do not run during a selective sync operation Source 7সোর্স 7.
  • Leaving the initial admin secret. Delete the argocd-initial-admin-secret from the Argo CD namespace once you have changed the password Source 5সোর্স 5.

সহজ English

বাংলা ব্যাখ্যা

  • হাতে test environment বদলানো। self-heal থাকলে cluster-এর state Git থেকে সরে গেলে Argo CD আবার sync করে ফিরিয়ে আনে Source 6সোর্স 6। self-heal না থাকলে এমন change sync চালু করে না Source 6সোর্স 6, আর application OutOfSync দেখায় Source 2সোর্স 2। তার বদলে Git repository বদলান।
  • মুছে ফেলা manifest-এর জিনিস চলে যাবে ভাবা। default-ভাবে automated sync Git-এ আর নেই এমন resource মোছে না Source 6সোর্স 6। pruning-সহ একটা manual sync সবসময় এগুলো মুছতে পারে Source 6সোর্স 6।
  • ফেল করা sync আবার চেষ্টা হবে ভেবে অপেক্ষা করা। automated sync প্রতিটা commit আর application parameter-এর জোড়ার জন্য একবার চেষ্টা করে, আর একই commit ও parameter-এ আগের চেষ্টা ফেল করলে আবার চেষ্টা করে না Source 6সোর্স 6। fix-টা নতুন commit হিসেবে push করুন, অথবা একটা retry policy দিন: Argo CD exponential backoff দিয়ে ফেল করা sync আবার চেষ্টা করতে পারে Source 6সোর্স 6।
  • automated sync চালু রেখে rollback-এর পরিকল্পনা। automated sync চালু থাকা application-এ rollback করা যায় না Source 6সোর্স 6।
  • selective sync-এ hook আশা করা। selective sync operation-এ hook চলে না Source 7সোর্স 7।
  • initial admin secret রেখে দেওয়া। password বদলানোর পর Argo CD namespace থেকে argocd-initial-admin-secret মুছে দিন Source 5সোর্স 5।

What a tester can check

Tutorial advice

This list is the tutorial's own advice for a tester on a team that uses GitOps.

  • Ask which Git repository and path hold the desired state of each test environment.
  • In a bug report, give the commit of that repository as well as the version of the application.
  • Before you test, check that the application is Synced and Healthy.
  • Ask whether self-heal is on before you change anything in a test environment by hand.
  • Ask for smoke tests as PostSync hooks, and ask who is told when they fail.
  • Ask how a rollback is done, since it is blocked while automated sync is on.
  • Ask that changes to the desired state of a test environment get a pull request review, like code.

সহজ English

Tutorial advice

This list is the tutorial's own advice for a tester on a team that uses GitOps.

  • Ask which Git repository and folder hold the desired state of each test environment.
  • In a bug report, give the commit of that repository as well as the version of the application.
  • Before you test, check that the application is Synced and Healthy.
  • Ask if self-heal is on before you change anything in a test environment by hand.
  • Ask for smoke tests as PostSync hooks, and ask who hears about it when they fail.
  • Ask how a rollback is done, because it is blocked while automated sync is on.
  • Ask that changes to the desired state of a test environment get a pull request review, like code.

বাংলা ব্যাখ্যা

Tutorial advice

এই তালিকা টিউটোরিয়ালের নিজের পরামর্শ, GitOps ব্যবহার করা টিমের একজন tester-এর জন্য।

  • জিজ্ঞেস করুন প্রতিটা test environment-এর desired state কোন Git repository আর path-এ থাকে।
  • bug report-এ application-এর version-এর সাথে সেই repository-র commit-ও দিন।
  • test শুরুর আগে দেখুন application Synced আর Healthy কি না।
  • test environment-এ হাতে কিছু বদলানোর আগে জিজ্ঞেস করুন self-heal চালু কি না।
  • PostSync hook হিসেবে smoke test চান, আর জিজ্ঞেস করুন সেগুলো ফেল করলে কাকে জানানো হয়।
  • জিজ্ঞেস করুন rollback কীভাবে হয়, কারণ automated sync চালু থাকলে rollback আটকে থাকে।
  • বলুন test environment-এর desired state-এর change-ও code-এর মতো pull request review পার হোক।

Key words

TermMeaning
GitOpsManaging a system that is described declaratively and version controlled, with an automated process that makes it match Git
Desired stateWhat the system should be, as declared in the source, such as Git
Live stateThe state of the running application, which Argo CD compares with the desired target state
ReconciliationMaking sure that a given state matches the declared desired state
OutOfSyncThe live state deviates from the target state in Git
SyncMaking the live state match the desired state
Automated syncArgo CD syncs by itself when Git and the cluster differ
Self-healStarting an automated sync when the live cluster deviates from Git
PruneDeleting resources that are no longer defined in Git
HookA resource that runs in a sync phase: PreSync, Sync, PostSync, or SyncFail
Argo CDA declarative, GitOps continuous delivery tool for Kubernetes
FluxA tool that keeps Kubernetes clusters in sync with sources of configuration
Source (Flux)Where the desired state is, and how to get it
Kustomization (Flux)A set of Kubernetes resources that Flux reconciles

Reels on this topicএই টপিকের রিলস

Short videos from other creators, picked for this topic. They are not part of this page's fact-checked text. Nothing loads from YouTube until you press Play.অন্য ক্রিয়েটরদের বানানো ছোট ভিডিও, এই টপিকের জন্য বাছাই করা। এগুলো এই পেজের ফ্যাক্ট-চেক করা লেখার অংশ নয়। চালান বাটন চাপার আগে YouTube থেকে কিছুই লোড হয় না।

  1. [1]
    What is OpenGitOps?

    OpenGitOps · accessed 2026-11-15দেখা হয়েছে: 2026-11-15

  2. [2]
    What Is Argo CD?

    Argo CD documentation · accessed 2026-11-15দেখা হয়েছে: 2026-11-15

  3. [3]
    Flux

    Flux documentation · accessed 2026-11-15দেখা হয়েছে: 2026-11-15

  4. [4]
    Core Concepts

    Flux documentation · accessed 2026-11-15দেখা হয়েছে: 2026-11-15

  5. [5]
    Getting Started

    Argo CD documentation · accessed 2026-11-15দেখা হয়েছে: 2026-11-15

  6. [6]
    Automated Sync Policy

    Argo CD documentation · accessed 2026-11-15দেখা হয়েছে: 2026-11-15

  7. [7]
    Sync Phases and Waves

    Argo CD documentation · accessed 2026-11-15দেখা হয়েছে: 2026-11-15

  8. [8]
    Install Tools

    Kubernetes documentation · accessed 2026-11-15দেখা হয়েছে: 2026-11-15