前往小程序,Get更优阅读体验!
立即前往
首页
学习
活动
专区
工具
TVP
发布
社区首页 >专栏 >Kubernetes集群中部署Argo CD持续部署

Kubernetes集群中部署Argo CD持续部署

作者头像
院长技术
发布2022-03-23 15:51:15
9100
发布2022-03-23 15:51:15
举报
文章被收录于专栏:院长运维开发

K8s集群中部署Argo CD持续部署

创建argocd命名空间

代码语言:javascript
复制
kubectl create namespace argocd

安装资源

代码语言:javascript
复制
kubectl apply -n argocd -f https://raw.githubusercontent.com/argoproj/argo-cd/stable/manifests/install.yaml
代码语言:javascript
复制
customresourcedefinition.apiextensions.k8s.io/applications.argoproj.io created
customresourcedefinition.apiextensions.k8s.io/appprojects.argoproj.io created
serviceaccount/argocd-application-controller created
serviceaccount/argocd-dex-server created
serviceaccount/argocd-server created
role.rbac.authorization.k8s.io/argocd-application-controller created
role.rbac.authorization.k8s.io/argocd-dex-server created
role.rbac.authorization.k8s.io/argocd-server created
clusterrole.rbac.authorization.k8s.io/argocd-application-controller created
clusterrole.rbac.authorization.k8s.io/argocd-server created
rolebinding.rbac.authorization.k8s.io/argocd-application-controller created
rolebinding.rbac.authorization.k8s.io/argocd-dex-server created
rolebinding.rbac.authorization.k8s.io/argocd-server created
clusterrolebinding.rbac.authorization.k8s.io/argocd-application-controller created
clusterrolebinding.rbac.authorization.k8s.io/argocd-server created
configmap/argocd-cm created
configmap/argocd-gpg-keys-cm created
configmap/argocd-rbac-cm created
configmap/argocd-ssh-known-hosts-cm created
configmap/argocd-tls-certs-cm created
secret/argocd-secret created
service/argocd-dex-server created
service/argocd-metrics created
service/argocd-redis created
service/argocd-repo-server created
service/argocd-server-metrics created
service/argocd-server created
deployment.apps/argocd-application-controller created
deployment.apps/argocd-dex-server created
deployment.apps/argocd-redis created
deployment.apps/argocd-repo-server created
deployment.apps/argocd-server created

查看argocd命名空间下的所有资源

代码语言:javascript
复制
[root@k8s-master ~]# kubectl get all -n argocd
代码语言:javascript
复制
NAME                                                 READY   STATUS              RESTARTS   AGE
pod/argocd-application-controller-5db8c6f8f9-r22c9   0/1     ContainerCreating   0          11s
pod/argocd-dex-server-84b5cbfbc9-w2zmc               0/1     Init:0/1            0          11s
pod/argocd-redis-7c7c79dcd9-6ghw7                    0/1     ContainerCreating   0          11s
pod/argocd-repo-server-5fb9cbb945-k594b              0/1     ContainerCreating   0          10s
pod/argocd-server-8d8cb6488-jmqtc                    0/1     ContainerCreating   0          10s

NAME                            TYPE        CLUSTER-IP       EXTERNAL-IP   PORT(S)                      AGE
service/argocd-dex-server       ClusterIP   10.111.26.128    <none>        5556/TCP,5557/TCP,5558/TCP   11s
service/argocd-metrics          ClusterIP   10.105.248.214   <none>        8082/TCP                     11s
service/argocd-redis            ClusterIP   10.101.110.209   <none>        6379/TCP                     11s
service/argocd-repo-server      ClusterIP   10.106.143.32    <none>        8081/TCP,8084/TCP            11s
service/argocd-server           ClusterIP   10.99.143.48     <none>        80/TCP,443/TCP               11s
service/argocd-server-metrics   ClusterIP   10.101.34.55     <none>        8083/TCP                     11s

NAME                                            READY   UP-TO-DATE   AVAILABLE   AGE
deployment.apps/argocd-application-controller   0/1     1            0           11s
deployment.apps/argocd-dex-server               0/1     1            0           11s
deployment.apps/argocd-redis                    0/1     1            0           11s
deployment.apps/argocd-repo-server              0/1     1            0           10s
deployment.apps/argocd-server                   0/1     1            0           10s

NAME                                                       DESIRED   CURRENT   READY   AGE
replicaset.apps/argocd-application-controller-5db8c6f8f9   1         1         0       11s
replicaset.apps/argocd-dex-server-84b5cbfbc9               1         1         0       11s
replicaset.apps/argocd-redis-7c7c79dcd9                    1         1         0       11s
replicaset.apps/argocd-repo-server-5fb9cbb945              1         1         0       10s
replicaset.apps/argocd-server-8d8cb6488                    1         1         0       10s

稍等片刻,就会完成

代码语言:javascript
复制
[root@k8s-master ~]# kubectl get all -n argocd
代码语言:javascript
复制
NAME                                                 READY   STATUS    RESTARTS   AGE
pod/argocd-application-controller-5db8c6f8f9-r22c9   1/1     Running   0          13h
pod/argocd-dex-server-84b5cbfbc9-w2zmc               1/1     Running   0          13h
pod/argocd-redis-7c7c79dcd9-6ghw7                    1/1     Running   0          13h
pod/argocd-repo-server-5fb9cbb945-k594b              1/1     Running   0          13h
pod/argocd-server-8d8cb6488-jmqtc                    1/1     Running   0          13h

NAME                            TYPE        CLUSTER-IP       EXTERNAL-IP   PORT(S)                      AGE
service/argocd-dex-server       ClusterIP   10.111.26.128    <none>        5556/TCP,5557/TCP,5558/TCP   13h
service/argocd-metrics          ClusterIP   10.105.248.214   <none>        8082/TCP                     13h
service/argocd-redis            ClusterIP   10.101.110.209   <none>        6379/TCP                     13h
service/argocd-repo-server      ClusterIP   10.106.143.32    <none>        8081/TCP,8084/TCP            13h
service/argocd-server           NodePort    10.99.143.48     <none>        80:30706/TCP,443:31741/TCP   13h
service/argocd-server-metrics   ClusterIP   10.101.34.55     <none>        8083/TCP                     13h

NAME                                            READY   UP-TO-DATE   AVAILABLE   AGE
deployment.apps/argocd-application-controller   1/1     1            1           13h
deployment.apps/argocd-dex-server               1/1     1            1           13h
deployment.apps/argocd-redis                    1/1     1            1           13h
deployment.apps/argocd-repo-server              1/1     1            1           13h
deployment.apps/argocd-server                   1/1     1            1           13h

NAME                                                       DESIRED   CURRENT   READY   AGE
replicaset.apps/argocd-application-controller-5db8c6f8f9   1         1         1       13h
replicaset.apps/argocd-dex-server-84b5cbfbc9               1         1         1       13h
replicaset.apps/argocd-redis-7c7c79dcd9                    1         1         1       13h
replicaset.apps/argocd-repo-server-5fb9cbb945              1         1         1       13h
replicaset.apps/argocd-server-8d8cb6488                    1         1         1       13h

修改Service的Cluster更改为NodePort

代码语言:javascript
复制
[root@k8s-master ~]# kubectl edit -n argocd svc argocd-server
service/argocd-server edited

查看argocd的service

代码语言:javascript
复制
[root@k8s-master ~]# kubectl get svc -n argocd
NAME                    TYPE        CLUSTER-IP       EXTERNAL-IP   PORT(S)                      AGE
argocd-dex-server       ClusterIP   10.111.26.128    <none>        5556/TCP,5557/TCP,5558/TCP   87s
argocd-metrics          ClusterIP   10.105.248.214   <none>        8082/TCP                     87s
argocd-redis            ClusterIP   10.101.110.209   <none>        6379/TCP                     87s
argocd-repo-server      ClusterIP   10.106.143.32    <none>        8081/TCP,8084/TCP            87s
argocd-server           NodePort    10.99.143.48     <none>        80:30706/TCP,443:31741/TCP   87s
argocd-server-metrics   ClusterIP   10.101.34.55     <none>        8083/TCP                     87s

查看登录密码---默认账户为:admin

代码语言:javascript
复制
kubectl get pods -n argocd -l app.kubernetes.io/name=argocd-server -o name | cut -d'/' -f 2
本文参与 腾讯云自媒体同步曝光计划,分享自作者个人站点/博客。
如有侵权请联系 cloudcommunity@tencent.com 删除

本文分享自 作者个人站点/博客 前往查看

如有侵权,请联系 cloudcommunity@tencent.com 删除。

本文参与 腾讯云自媒体同步曝光计划  ,欢迎热爱写作的你一起参与!

评论
登录后参与评论
0 条评论
热度
最新
推荐阅读
目录
  • K8s集群中部署Argo CD持续部署
    • 创建argocd命名空间
      • 安装资源
        • 查看argocd命名空间下的所有资源
          • 稍等片刻,就会完成
            • 修改Service的Cluster更改为NodePort
              • 查看argocd的service
                • 查看登录密码---默认账户为:admin
                相关产品与服务
                持续部署
                CODING 持续部署(CODING Continuous Deployment,CODING-CD)用以管理软件在经过构建之后的发布和部署交付过程,可以无缝对接上游 Git 仓库、制品仓库实现全自动化部署,同时支持 Webhook 等外部对接能力,方便集成各种开发、运维工具。在配以合适的技术架构、运维工具的基础上,可以方便地实现蓝绿发布、灰度发布(金丝雀发布)、滚动发布、快速回滚等功能。
                领券
                问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档