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

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

作者头像
院长技术
发布2020-11-23 11:10:33
7820
发布2020-11-23 11:10:33
举报
文章被收录于专栏:院长运维开发

创建argocd命名空间

[root@k8s-master ~]# kubectl create namespace argocd

代码语言:javascript
复制
namespace/argocd created

安装资源

[root@k8s-master ~]# 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命名空间下的所有资源

[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

稍等片刻,就会完成

[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

[root@k8s-master ~]# kubectl edit -n argocd svc argocd-server

代码语言:javascript
复制
service/argocd-server edited

查看argocd的service

[root@k8s-master ~]# kubectl get svc -n argocd

代码语言:javascript
复制
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

root@k8s-master ~]# kubectl get pods -n argocd -l app.kubernetes.io/name=argocd-server -o name | cut -d'/' -f 2

代码语言:javascript
复制
argocd-server-8d8cb6488-jmqtc
本文参与 腾讯云自媒体同步曝光计划,分享自作者个人站点/博客。
如有侵权请联系 cloudcommunity@tencent.com 删除

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

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

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

评论
登录后参与评论
0 条评论
热度
最新
推荐阅读
目录
  • 创建argocd命名空间
  • 安装资源
  • 查看argocd命名空间下的所有资源
  • 稍等片刻,就会完成
  • 修改Service的Cluster更改为NodePort
  • 查看argocd的service
  • 查看登录密码---默认账户为:admin
相关产品与服务
容器服务
腾讯云容器服务(Tencent Kubernetes Engine, TKE)基于原生 kubernetes 提供以容器为核心的、高度可扩展的高性能容器管理服务,覆盖 Serverless、边缘计算、分布式云等多种业务部署场景,业内首创单个集群兼容多种计算节点的容器资源管理模式。同时产品作为云原生 Finops 领先布道者,主导开源项目Crane,全面助力客户实现资源优化、成本控制。
领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档