全部產品
Search
文件中心

Container Service for Kubernetes:登入GitOps系統

更新時間:May 07, 2025

本文介紹ACK One GitOps使用者如何登入GitOps系統。

前提條件

通過ArgoCD CLI方式登入

通過ArgoCD Server LB IP登入

  1. 使用艦隊KubeConfig,執行以下命令,擷取ArgoCD Server LB IP。

    kubectl get svc -nargocd argocd-server -ojsonpath='{.status.loadBalancer.ingress[0].ip}'
  2. 執行以下命令,擷取admin密碼。

    kubectl -nargocd get secret argocd-initial-admin-secret -ojsonpath='{.data.password}' |base64 -d
  3. 登入ArgoCD Server。

    argocd login <argocd server lb ip>
    Username: admin
    Password:
    'admin:login' logged in successfully
    Context '<argocd server lb ip>' updated

通過kubectl port-forward登入

執行以下命令,Local User可通過kubectl port-forward登入ArgoCD。

export ARGOCD_OPTS='--port-forward-namespace argocd --port-forward'

argocd login
Username: localuser1
Password:
'localuser1:login' logged in successfully
Context 'port-forward' updated

通過ArgoCD UI方式登入

通過ArgoCD Server LB IP登入

  1. 在瀏覽器輸入ArgoCD Server LB IP,訪問ArgoCD UI頁面。格式為https://<argocd server lb ip>

  2. 在登入頁面,輸入Local User的使用者名稱和密碼,然後單擊SIGN IN

通過kubectl port-forward登入

  1. 執行以下命令,在本地使用ACK One Fleet執行個體的KubeConfig進行port-forward代理,通過代理訪問ArgoCD UI頁面。

    kubectl port-forward -n argocd service/argocd-server 8080:https
  2. 在瀏覽器輸入https://127.0.0.1:8080,訪問ArgoCD UI頁面。

  3. 在登入頁面,輸入Local User的使用者名稱和密碼,然後單擊SIGN IN