参考这篇文章部署flux:http://reborncodinglife.com/2024/01/09/flux-learning-deploy-flux-in-kind/
PASSWORD="admin"
gitops create dashboard ww-gitops \
--password=$PASSWORD \
--export > ./clusters/private-cloud/weave-gitops/weave-gitops-dashboard.yaml
设置默认登录密码为admin,执行这个命令,会自动生成一个包含helmrepository和helmrelease的yaml文件。将这个文件提交flux管理的git repo,flux会自动部署。
git add -A && git commit -m "Add Weave GitOps Dashboard"
git push
kubectl port-forward svc/weave-gitops -n flux-system 9001:9001
最后通过端口转发方式验证,登录flux ui:http://localhost:9001/
也可以直接clone weave-gitops仓库,自己生成部署需要的yaml,然后按照flux的方式创建相应的kustomization和gitrepository部署。
$ cd weave-gitops/
$ helm template charts/gitops-server/ > flux-ui.yaml
具体配置参考:
LEo at 00:12