Skills2026年4月11日·1 分钟阅读

Argo CD — Declarative GitOps Continuous Delivery for Kubernetes

Argo CD is a declarative GitOps CD tool for Kubernetes. Sync applications from Git repositories automatically, with visual diff, rollback, and multi-cluster support.

Agent 就绪

Agent 可直接安装

这个资产可安装;Agent 先选择当前运行时、检查安装计划,再运行匹配命令。

Native · 98/100策略:允许
Agent 入口
任意 MCP/CLI Agent
类型
Skill
安装
Single
信任
信任等级:Established
入口
step-1.md
直接安装命令
npx -y tokrepo@latest install ca164613-353d-11f1-9bc6-00163e2b0d79 --target codex

先 dry-run 确认安装计划,再运行此命令。

TL;DR
Argo CD syncs Kubernetes applications from Git with visual diffs and automated rollback.
§01

What it is

Argo CD is a declarative GitOps continuous delivery tool for Kubernetes. It watches Git repositories containing your application manifests and automatically syncs them to your Kubernetes clusters. When someone pushes a change to the Git repo, Argo CD detects the diff, shows you what will change, and applies it. It supports Helm charts, Kustomize, plain YAML, and Jsonnet.

Argo CD targets platform teams and DevOps engineers who want Git as the single source of truth for their Kubernetes deployments. Instead of running kubectl apply manually or building custom CI/CD pipelines, Argo CD handles the deployment lifecycle declaratively.

§02

Why it saves time or tokens

Manual Kubernetes deployments require running kubectl commands, tracking what version is deployed where, and hoping nobody made undocumented changes. Argo CD eliminates drift by continuously reconciling cluster state with Git. Rollback is instant: revert the Git commit and Argo CD redeploys the previous version. For AI-assisted infrastructure management, Argo CD reduces deployment to a Git push, which is simpler than generating kubectl commands.

§03

How to use

  1. Install Argo CD in your cluster: kubectl apply -n argocd -f https://raw.githubusercontent.com/argoproj/argo-cd/stable/manifests/install.yaml
  2. Create an Application resource pointing at your Git repo and target cluster
  3. Argo CD syncs your manifests and shows deployment status in the web UI
§04

Example

apiVersion: argoproj.io/v1alpha1
kind: Application
metadata:
  name: web-app
  namespace: argocd
spec:
  project: default
  source:
    repoURL: https://github.com/myorg/k8s-manifests.git
    targetRevision: main
    path: apps/web-app
  destination:
    server: https://kubernetes.default.svc
    namespace: production
  syncPolicy:
    automated:
      prune: true
      selfHeal: true
FeatureDescription
Auto-syncDeploy on Git push
Visual diffSee changes before applying
RollbackOne-click revert to any version
Multi-clusterManage multiple clusters
SSOOIDC, LDAP, SAML authentication
§05

Related on TokRepo

§06

Common pitfalls

  • Enabling auto-sync with prune: true deletes resources removed from Git; test this in staging before production
  • Argo CD manages the deployment, not the build; you still need a CI system (GitHub Actions, Jenkins) to build images
  • Secrets in Git repos must be encrypted (Sealed Secrets, SOPS, or External Secrets Operator); never commit plaintext secrets

常见问题

What is the difference between Argo CD and Flux?+

Both are CNCF GitOps tools for Kubernetes. Argo CD provides a rich web UI with visual diffs and a centralized multi-cluster management model. Flux uses a decentralized per-cluster approach with no built-in UI. Choose Argo CD for teams that value visual management; choose Flux for lightweight, per-cluster GitOps.

Does Argo CD support Helm charts?+

Yes. Argo CD natively renders Helm charts by running helm template during sync. You specify the chart repository, version, and values in the Application spec. Argo CD tracks the rendered manifests in Git, so you get the benefits of both Helm packaging and GitOps deployment.

How does Argo CD handle secrets?+

Argo CD does not manage secrets directly. Use Sealed Secrets, SOPS, External Secrets Operator, or Vault to handle secret encryption and injection. Argo CD syncs the encrypted secret resources from Git, and the in-cluster operator decrypts them. Never store plaintext secrets in your Git repository.

Can Argo CD manage multiple clusters?+

Yes. Argo CD can deploy applications to any Kubernetes cluster it has credentials for. You register external clusters and target them in Application specs. A single Argo CD instance can manage dozens of clusters from one dashboard.

What is self-heal in Argo CD?+

Self-heal automatically reverts manual changes made directly to the cluster. If someone runs kubectl edit to modify a resource that Argo CD manages, self-heal detects the drift and restores the resource to match the Git-defined state. This enforces Git as the single source of truth.

引用来源 (3)

讨论

登录后参与讨论。
还没有评论,来写第一条吧。

相关资产