用途:按照 OpenGitOps 原则,为 Kubernetes 集群搭建声明式、以 Git 为唯一事实来源的持续交付流程,可选 ArgoCD 或 Flux CD。
主要能力:ArgoCD 安装与初始管理员密码获取、GitOps 仓库目录结构(apps/infrastructure/argocd)、Application 与 App of Apps 模式;Flux CLI 安装与 flux bootstrap github 引导、GitRepository 与 Kustomization 资源;自动同步策略(prune、selfHeal、retry、interval、wait、timeout);ArgoCD Rollouts 金丝雀与蓝绿发布;External Secrets Operator 与 Sealed Secrets 密钥管理;最佳实践与排障命令。
必要用法示例: kubectl create namespace argocd kubectl apply -n argocd -f https://raw.githubusercontent.com/argoproj/argo-cd/stable/manifests/install.yaml curl -s https://fluxcd.io/install.sh | sudo bash flux bootstrap github --owner=org --repository=gitops-repo --branch=main --path=clusters/production --personal kubeseal --format yaml < secret.yaml > sealed-secret.yaml argocd app get my-app argocd app sync my-app --prune
适用场景:集群 GitOps 初始化、从 Git 自动部署应用、多集群管理、渐进式交付、同步策略配置、GitOps 密钥管理。
限制:资料未提供具体版本兼容性、权限要求、收费信息及实际效果数据;命令与清单需按自身环境调整。