Enable public access to GitOps

更新时间:
复制 MD 格式

Enable public access to GitOps to access and manage applications through the ArgoCD UI from outside your fleet's private network.

Prerequisites

Before you begin, ensure that you have:

Enable public access in the console

  1. Log on to the ACK One console. In the left-side navigation pane, choose Fleet > Multi-cluster Applications.

  2. On the Multi-cluster GitOps page, click the Dingtalk_20231226104633.jpg icon next to the fleet name in the upper-left corner and select the destination fleet from the drop-down list.

  3. GitOps is enabled by default for a new fleet. If GitOps is not yet enabled for your fleet, click Enable GitOps, then click OK in the dialog box. If GitOps is already enabled, the GitOps Console button appears on the page.

  4. Click Enable next to Public Access. In the Enable Public Access dialog box, enter the IP addresses or CIDR blocks to add to the whitelist, then click OK.

  5. After the fleet updates, click GitOps Console in the upper-right corner to access the ArgoCD UI over the Internet.

Enable public access using the CLI

This method requires Cloud Assistant CLI 3.0.172 or later with credentials configured.

Step 1: Get the cluster ID

Run the following command and record the cluster ID from the output:

aliyun adcp DescribeHubClusters

Step 2: Enable public access and configure access control

Important

Restrict public access to specific CIDR blocks. Granting access to all public IP addresses exposes the ArgoCD UI to unauthorized users.

Run the following command to get your computer's public IP address:

curl ifconfig.me

Then run the following command to enable public access. Replace regionId with your region ID, **** with your cluster ID, and 10.100.XX.XX/24 with your CIDR block:

aliyun adcp UpdateHubClusterFeature --RegionId regionId --ClusterId **** --PublicAccessEnabled true --AccessControlList "[\"10.100.XX.XX/24\"]" --ArgoCDEnabled true

Access the GitOps console

After enabling public access to ArgoCD, click GitOps Console on the Multi-cluster GitOps page to access GitOps.