美文网首页
安装 Argo CD

安装 Argo CD

作者: 李小西033 | 来源:发表于2020-08-09 10:08 被阅读0次

    操作系统:MacOS

    • 安装了kubectl
    • 有kubeconfig配置文件,默认路径为(~/.kube/config)
    1. 安装Argo CD
    kubectl create namespace argocd
    kubectl apply -n argocd -f https://raw.githubusercontent.com/argoproj/argo-cd/stable/manifests/install.yaml
    
    1. 安装Argo CD客户端
    brew tap argoproj/tap
    brew install argoproj/tap/argocd
    
    1. Port Forwarding暴露argocd-server
    kubectl port-forward svc/argocd-server -n argocd 8080:443
    

    访问 http://localhost:8080/login

    argocd cluster add docker-desktop
    
    1. 使用CLI客户端登陆
      获取自动生成的密码
    kubectl get pods -n argocd -l app.kubernetes.io/name=argocd-server -o name | cut -d'/' -f 2
    

    使用admin和上面获得的密码登陆

    1. 因为我的Argo CD和k8s安装在同一台机器上,所以无需为argocd注册k8s集群
    2. 基于Git Repo创建argocd应用
      创建namespace: argocd-app
      Demo: https://github.com/argoproj/argocd-example-apps
      image.png
    image.png
    完成之后点击create创建应用
    注意:如果是添加private repo需要在设置中添加该repo
    image.png
    1. 同步(部署)应用
      guestbook应用被创建之后可以通过argocd app get guestbook观察其状态
      image.png
      应用的初始状态为OutOfSync,点击Sync进行部署。
      image.png
    image.png

    https://argoproj.github.io/argo-cd/getting_started/

    相关文章

      网友评论

          本文标题:安装 Argo CD

          本文链接:https://www.haomeiwen.com/subject/jubpactx.html