Argo CD Argo CD

使用 Argo CD 部署 Web 应用

借助 Argo CD 从 Git 到生产环境。

10 min 初级

了解如何使用 Argo CD,将应用从 Git 仓库部署为 RackMint 上运行的实例。

创建 Git 仓库

准备一个包含应用清单的 Git 仓库。

git clone https://github.com/rackmint-samples/argo-webapp.git
cd argo-webapp

配置 Argo CD

在集群中安装并配置 Argo CD。

argocd app create my-app \
  --repo https://github.com/rackmint-samples/argo-webapp.git \
  --path manifests \
  --dest-server https://kubernetes.default.svc \
  --dest-namespace default

部署应用

同步应用并验证部署。

argocd app sync my-app
argocd app get my-app

Argo CD 同步状态

同步完成后,你的应用就上线了,此后 Argo CD 会持续让它与 Git 仓库保持同步。

热门指南