0.背景
博客地址 https://blog.hylstudio.cn/archives/1350
飞书文档 https://paraparty.feishu.cn/docx/GEwVdulCgoLX7dxSHMecy4mBnch
argocd试玩,对于argocd定位是cd,能否胜任k8s面板存疑
结论:不能当作k8s面板使用,但对小白开发比较友好
这里作为备份,为了最好的阅读体验可以看飞书
1.安装
0 1 |
mkdir argocd cd argocd wget https://raw.githubusercontent.com/argoproj/argo-cd/v2.9.3/manifests/ha/install.yaml |
提取镜像路径,做本地化
0 1 2 3 4 5 6 7 8 9 10 11 |
sudo docker pull ghcr.io/dexidp/dex:v2.37.0 sudo docker tag ghcr.io/dexidp/dex:v2.37.0 harbor.hylstudio.local/dexidp/dex:v2.37.0 sudo docker push harbor.hylstudio.local/dexidp/dex:v2.37.0 sudo docker pull redis:7.0.11-alpine sudo docker tag redis:7.0.11-alpine harbor.hylstudio.local/library/redis:7.0.11-alpine sudo docker push harbor.hylstudio.local/library/redis:7.0.11-alpine sudo docker pull quay.io/argoproj/argocd:v2.9.3 sudo docker tag quay.io/argoproj/argocd:v2.9.3 harbor.hylstudio.local/argoproj/argocd:v2.9.3 sudo docker push harbor.hylstudio.local/argoproj/argocd:v2.9.3 |
替换install.yaml中的镜像路径
0 1 |
kubectl create namespace argocd kubectl apply -n argocd -f install.yaml |
安装后容器列表如图
资源占用如图
2.kubectl配置转发
0 1 |
kubectl -n argocd port-forward service/argocd-server :80 |
0 1 |
0 1 |
到argocd-initial-admin-secret这里找默认密码,用户名是admin
3.本地命令行配置
0 1 |
mkdir -p /usr/local/argocd/bin cd /usr/local/argocd/bin wget https://localhost:43819/download/argocd-linux-amd64 mv argocd-linux-amd64 argocd cd /usr/local/bin ln -s /usr/local/argocd/bin/argocd
0 1 |
4.first demo
0 1 |
kubectl config set-context –current –namespace=argocd 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 argocd app sync guestbook
0 1 |
参考
https://argo-cd.readthedocs.io/en/stable/getting_started/
0 Comments