iT邦幫忙

2022 iThome 鐵人賽

DAY 11
0
DevOps

從零開始的Kubernetes轉換系列 第 11

Day 11 架設 argo cd

  • 分享至 

  • xImage
  •  

今天我們來介紹argo cd,argo cd 是一個在kubernetes上很受到歡迎的GitOps deploy工具,大家可以到官網有詳細的介紹。argo-cd

這邊我們使用helm來部署argo cd。argo cd installation

helm-argo.tf

resource "helm_release" "argo" {
  name       = "argo"
  repository = "https://argoproj.github.io/argo-helm"
  chart      = "argo-cd"
  version    = "5.5.4"
  timeout    = 300

  cleanup_on_fail = "true"
  create_namespace = "true"
  namespace = "argo"

  values = [
    "${file("data/argo-value.yaml")}"
  ]
}

data/argo-value.yaml

redis-ha:
  enabled: true

controller:
  replicas: 1

server:
  replicas: 2

repoServer:
  replicas: 2

applicationSet:
  replicas: 2

terraform apply 後就可以看到argo部署好了

kubectl get -n argo all
NAME                                                         READY   STATUS    RESTARTS   AGE
pod/argo-argocd-application-controller-0                     1/1     Running   0          6m30s
pod/argo-argocd-applicationset-controller-6f5f475846-t2wms   1/1     Running   0          6m31s
pod/argo-argocd-dex-server-6575b8b898-qxpst                  1/1     Running   0          6m31s
pod/argo-argocd-notifications-controller-549c879c79-6zndx    1/1     Running   0          6m30s
pod/argo-argocd-repo-server-64954d5bb4-9dvvr                 1/1     Running   0          6m31s
pod/argo-argocd-repo-server-64954d5bb4-zc5cs                 1/1     Running   0          6m30s
pod/argo-argocd-server-5f6c8557df-n9w6w                      1/1     Running   0          6m31s
pod/argo-argocd-server-5f6c8557df-wllpk                      1/1     Running   0          6m31s
pod/argo-redis-ha-haproxy-7b755fc7d6-fgq5j                   1/1     Running   0          6m30s
pod/argo-redis-ha-haproxy-7b755fc7d6-qpdkq                   1/1     Running   0          6m30s
pod/argo-redis-ha-haproxy-7b755fc7d6-vkxbk                   1/1     Running   0          6m31s
pod/argo-redis-ha-server-0                                   4/4     Running   0          6m30s
pod/argo-redis-ha-server-1                                   4/4     Running   0          5m28s
pod/argo-redis-ha-server-2                                   4/4     Running   0          4m26s

NAME                                            TYPE        CLUSTER-IP     EXTERNAL-IP   PORT(S)                       AGE
service/argo-argocd-application-controller      ClusterIP   10.41.73.154   <none>        8082/TCP                      6m31s
service/argo-argocd-applicationset-controller   ClusterIP   10.41.64.108   <none>        7000/TCP                      6m31s
service/argo-argocd-dex-server                  ClusterIP   10.41.69.162   <none>        5556/TCP,5557/TCP             6m31s
service/argo-argocd-repo-server                 ClusterIP   10.41.68.194   <none>        8081/TCP                      6m31s
service/argo-argocd-server                      ClusterIP   10.41.66.54    <none>        80/TCP,443/TCP                6m31s
service/argo-redis-ha                           ClusterIP   None           <none>        6379/TCP,26379/TCP,9121/TCP   6m31s
service/argo-redis-ha-announce-0                ClusterIP   10.41.77.149   <none>        6379/TCP,26379/TCP,9121/TCP   6m31s
service/argo-redis-ha-announce-1                ClusterIP   10.41.67.156   <none>        6379/TCP,26379/TCP,9121/TCP   6m31s
service/argo-redis-ha-announce-2                ClusterIP   10.41.72.164   <none>        6379/TCP,26379/TCP,9121/TCP   6m31s
service/argo-redis-ha-haproxy                   ClusterIP   10.41.66.59    <none>        6379/TCP,9101/TCP             6m31s

NAME                                                    READY   UP-TO-DATE   AVAILABLE   AGE
deployment.apps/argo-argocd-applicationset-controller   1/1     1            1           6m31s
deployment.apps/argo-argocd-dex-server                  1/1     1            1           6m31s
deployment.apps/argo-argocd-notifications-controller    1/1     1            1           6m31s
deployment.apps/argo-argocd-repo-server                 2/2     2            2           6m31s
deployment.apps/argo-argocd-server                      2/2     2            2           6m31s
deployment.apps/argo-redis-ha-haproxy                   3/3     3            3           6m31s

NAME                                                               DESIRED   CURRENT   READY   AGE
replicaset.apps/argo-argocd-applicationset-controller-6f5f475846   1         1         1       6m31s
replicaset.apps/argo-argocd-dex-server-6575b8b898                  1         1         1       6m31s
replicaset.apps/argo-argocd-notifications-controller-549c879c79    1         1         1       6m31s
replicaset.apps/argo-argocd-repo-server-64954d5bb4                 2         2         2       6m31s
replicaset.apps/argo-argocd-server-5f6c8557df                      2         2         2       6m31s
replicaset.apps/argo-redis-ha-haproxy-7b755fc7d6                   3         3         3       6m31s

NAME                                                  READY   AGE
statefulset.apps/argo-argocd-application-controller   1/1     6m31s
statefulset.apps/argo-redis-ha-server                 3/3     6m31s

上一篇
Day 10 使用 sops 和 KMS 來加密我們的 secret
下一篇
Day 12 Cilium
系列文
從零開始的Kubernetes轉換30
圖片
  直播研討會
圖片
{{ item.channelVendor }} {{ item.webinarstarted }} |
{{ formatDate(item.duration) }}
直播中

尚未有邦友留言

立即登入留言