This topic describes how to log on to the GitOps system.
Prerequisites
The kubeconfig file of the Fleet instance is obtained in the Distributed Cloud Container Platform for Kubernetes (ACK One) console and a kubectl client is connected to the Fleet instance.
(Required if you use Argo CD CLI) Argo CD CLI v2.8.7 is downloaded and installed. For more information, see ArgoCD v2.8.7.
Introduction to the domain name of the GitOps Argo CD server
By default, ACK One GitOps creates a Server Load Balancer (SLB) instance to expose the Argo CD server and generates a domain name that is resolved to the internal IP address of the SLB instance for the Argo CD server. The Argo CD server domain name is in the following format: https://argocd.<ackone cluster id>.<region>.alicontainer.com
, where <ackone cluster id>
is the ID of the ACK One Fleet instance and <region>
is the region where the ACK One Fleet instance is deployed.
To ensure data security, the SLB instance is used to expose only private IP addresses.
Use the Argo CD CLI to log on to Argo CD
Use an Alibaba Cloud RAM user
Download the Argo CD CLI developed by ACK One. You can click one of the following links to download Argo CD CLI v2.9.5. After you download the Argo CD CLI, change the file name to
argocd
.NoteThe open source Argo CD CLI does not allow RAM users to log on to Argo CD by using single sign-on (SSO).
Run the following command to use a RAM user to access the domain name of the Argo CD server:
argocd login argocd.<cluster id>.<region>.alicontainer.com --sso --insecure Opening browser for authentication Performing authorization_code flow login: https://signin.aliyun.com/oauth2/v1/auth?access_type=... Authentication successful 'root' logged in successfully Context 'argocd.<cluster id>.<region>.alicontainer.com' updated
Use a GitOps local user
Access the domain name of the Argo CD server
Run the following command to use a GitOps local user to access the domain name of the Argo CD server:
argocd login argocd.<ackone cluster id>.<region>.alicontainer.com
Username: localuser1
Password:
'localuser1:login' logged in successfully
Context 'argocd.<ackone cluster id>.<region>.alicontainer.com' updated
Run the kubectl port-forward command
Run the following command to use a GitOps local user to log on to Argo CD through port forwarding:
export ARGOCD_OPTS='--port-forward-namespace argocd --port-forward'
argocd login
Username: localuser1
Password:
'localuser1:login' logged in successfully
Context 'port-forward' updated
Use the Argo CD UI to log on to Argo CD
Use an Alibaba Cloud RAM user
Enter the domain name of the Argo CD server in the address bar of a browser to access the Argo CD UI.
The format of the domain name is
https://argocd.<ackone cluster id>.<region>.alicontainer.com
, where<ackone cluster id>
is the ID of the ACK One Fleet instance and<region>
is the region where the ACK One Fleet instance is deployed.On the logon page, click LOG IN VIA ALIYUN to log on by using SSO.
If you use a RAM user, you can use SSO to log on to Argo CD without entering a username and password.
Use a GitOps local user
Access the domain name of the Argo CD server
Enter the domain name of the Argo CD server in the address bar of a browser to access the Argo CD UI.
The format of the domain name is
https://argocd.<ackone cluster id>.<region>.alicontainer.com
, where<ackone cluster id>
is the ID of the ACK One Fleet instance and<region>
is the region where the ACK One Fleet instance is deployed.On the logon page, enter the username and password of the local user, and then click SIGN IN.
Run the kubectl port-forward command
Run the following command to use the kubeconfig file of the ACK One Fleet instance to log on to Argo CD through port forwarding:
kubectl port-forward -n argocd service/argocd-server 8080:https
Enter
https://127.0.0.1:8080
into the web browser to access the web interface of Argo CD.On the logon page, enter the username and password of the local user, and then click SIGN IN.