1.下载GitHub - argoproj/argo-cd: Declarative continuous deployment for Kubernetes.
2.安装
unzip argo-cd-master.zip
cd argo-cd-master
kubectl create namespace argocd
kubectl apply -n argocd -f manifests/install.yaml
3.cli安装:
cli下载:
https://github.com/argoproj/argo-cd/releases/download/v2.1.2/argocd-linux-amd64
cp argocd-linux-amd64 /usr/local/bin/argocd
chmod +x /usr/local/bin/argocd
4.使用
修改svc:NodePort
查看admin密码:kubectl -n argocd get secret argocd-initial-admin-secret -o jsonpath="{.data.password}" | base64 -d; echo
网页打开:
5.由于网络问题,把git上的示例下载到本地gitlab中
gitlab安装:gitlab安装 - 少年老余 - 博客园 (cnblogs.com)
gitlab创建project:argocd-example-apps-master
克隆到本地:
git clone http://192.168.118.133/root/argocd-example-apps-master.git
cd argocd-example-apps-master/
cp -a ../test/argocd-example-apps-master/* .
#提交
git add .
git commit -m "add"
git push origin master
6.登录安装示例
登录:
argocd login 192.168.118.134:30831 --username admin --password tJbm9325PlZThpZH
测试示例:
argocd app create guestbook --repo http://192.168.118.133/root/argocd-example-apps-master.git --path guestbook --dest-server https://kubernetes.default.svc --dest-namespace default
或者web操作:
参考:
https://blog.csdn.net/weixin_42554142/article/details/122846080
Getting Started - Argo CD - Declarative GitOps CD for Kubernetes (argo-cd.readthedocs.io)