Argocd 试用

210 阅读1分钟

获取访问密码

kubectl -n test-argocd get secret argocd-initial-admin-secret -o jsonpath="{.data.password}" | base64 -d

添加repo

勾选 Skip server verfication

git

新建repo、根目录提交文件、新建目录、添加文件。并提交

新建应用

同步策略:自动、资源 选择已添加的 kktest1.git。Path 输入 test。Revision:HEAD /Branches、Cluster 选默认、Namespace test

应用状态unknow

failed to sync cluster https://192.168.114.1:443: failed to load initial state of resource Node: nodes is forbidden: User "system:serviceaccount:test-argocd:argocd-application-controller" cannot list resource "nodes" in API group "" at the cluster scope



[root@iZj6cbaawmbzi712wvf7jrZ ~]# kubectl get serviceaccounts -n test-argocd

NAME SECRETS AGE

argocd-application-controller 1 3d8h

argocd-applicationset-controller 1 3d8h

argocd-dex-server 1 3d8h

argocd-notifications-controller 1 3d8h

argocd-redis 1 3d8h

argocd-repo-server 1 3d8h

argocd-server 1 3d8h

default 1 3d8h

[root@iZj6cbaawmbzi712wvf7jrZ ~]# kubectl create clusterrolebinding argocd-application-controller-clusterrolebinding --clusterrole=cluster-admin --serviceaccount=test-argocd:argocd-application-controller

clusterrolebinding.rbac.authorization.k8s.io/argocd-application-controller-clusterrolebinding created

[root@iZj6cbaawmbzi712wvf7jrZ ~]#

更新yml并提交

Git access key