All Products
Search
Document Center

API Gateway:Access an ACK managed cluster through an APIG Ingress

Last Updated:Dec 11, 2025

APIG Ingress is the Enterprise Edition of Higress. It is compatible with Nginx Ingress and provides benefits such as low cost, high security, deep integration, and high availability. You can use an APIG Ingress to access Container Service for Kubernetes (ACK) and Container Compute Service clusters.

Important

For security reasons, APIG Ingress does not allow you to expose services in the kube-system namespace.

Prerequisites

APIG Controller can be installed only in an ACK managed cluster.

Step 1: Install APIG Controller

  1. Log on to the ACK console. In the left navigation pane, click Clusters.

  2. On the Clusters page, find the one you want to manage and click its name. In the left navigation pane, click Add-ons.

  3. On the Add-ons page, enter APIG in the search box. On the APIG Controller card, click Install.

  4. In the Install dialog box, configure the parameters and click OK.

    • Create:

      A pay-as-you-go cloud-native API gateway instance with the apig.small.x1 specification is automatically created.

    • Select Existing VPC:

      Select a pay-as-you-go cloud-native API gateway instance from the list. The instance must be in the same VPC as the container cluster and not associated with other clusters.

    If the component installation fails with a prerequisite check failure, grant permissions to the APIG Controller.
  5. Check whether the component is installed.

    After the component is installed, an ApigConfig resource and a gateway instance are created by default. Both are named apig-controller-pro-{clusterid}.

    Go to Workloads > Custom Resources. Click the Resource Objects tab. In the API Group search box, enter apig. In the Actions column for the ApigConfig, click Edit YAML to view the status of the ApigConfig. Wait for 3 to 5 minutes and make sure that the value of the phase field is Listening in the YAML file. This indicates that the cloud-native API gateway is created, running, and automatically listening for Ingress resources in the cluster that have the IngressClass set to apig.

    The status of the ApigConfig changes in the following order: Pending > Running > Listening. The statuses are described as follows:

    • Pending: The cloud-native API gateway is being created. This process takes about 3 minutes.

    • Running: The cloud-native API gateway is created and running.

    • Listening: The cloud-native API gateway is running and listening for Ingress resources in the cluster.

    • Failed: The cloud-native API gateway is in an invalid state. You can view the Message field in the Status section for more information.

    Important
    • In Create mode, installing APIG Controller creates an ApigConfig resource by default. The lifecycle of this resource is bound to the cloud-native API gateway instance. If you delete the ApigConfig resource, the corresponding cloud-native API gateway instance is also deleted. Do not delete the ApigConfig resource.

    • If an IngressClass resource named apig already exists in the cluster before you install APIG Controller, the installation does not automatically create an ApigConfig resource or a cloud-native API gateway instance.

  6. Log on to the Cloud-native API Gateway console. In the corresponding region, you can find the cloud-native gateway instance named apig-controller-pro-{clusterid}.

Step 2: Deploy the backend service

  1. Log on to the ACK console. In the left navigation pane, click Clusters.

  2. On the Clusters page, find the cluster you want to manage and click its name. In the left navigation pane, choose Workloads > Deployments.

  3. On the Deployments page, click Create from YAML. Use the following YAML template to deploy a Deployment named httpbin and a Service named httpbin.

    apiVersion: apps/v1
    kind: Deployment
    metadata:
      name: httpbin
      namespace: default
    spec:
      replicas: 1
      selector:
        matchLabels:
          app: httpbin
      template:
        metadata:
          labels:
            app: httpbin
            version: v1
        spec:
          containers:
            - image: registry.cn-hangzhou.aliyuncs.com/mse-ingress/go-httpbin
              args:
                - "--version=v1"
              imagePullPolicy: Always
              name: httpbin
    ---
    apiVersion: v1
    kind: Service
    metadata:
      name: httpbin
      namespace: default
    spec:
      ports:
        - port: 8080
          protocol: TCP
      selector:
        app: httpbin
  4. Verify that the Deployment and Service are deployed.

    1. In the navigation pane on the left, choose Workloads > Deployments. A Deployment named httpbin is created. The Deployment is deployed when the Pods field shows 1/1.

    2. In the navigation pane on the left, choose Network > Services. A Service named httpbin is created, which indicates that the Service is deployed.

Step 3: Configure the APIG Ingress

  1. Log on to the ACK console. In the left navigation pane, click Clusters.

  2. On the Clusters page, find the cluster you want and click its name. In the left navigation pane, choose Network > Ingresses.

  3. On the Ingresses page, click Create Ingress.

  4. In the Create Ingress dialog box, set Gateway Type to APIG Ingress, configure the associated backend service and annotations, and then click OK.

    Note

    Set Ingress Class to apig. In the routing rule, select Prefix (Prefix-based Match), set the Path to /, and configure the rule to forward requests to the httpbin service.

  5. Log on to the Cloud-native API Gateway console. In the corresponding cloud-native API gateway instance, you can find an API whose name contains {gwid}-ingress.

Step 4: Access the service

  1. Obtain the Network Load Balancer (NLB) domain name from the Ingress endpoint or the public IP address from the gateway.

    1. Log on to the ACK console. In the left navigation pane, click Clusters.

    2. On the Clusters page, find the cluster you want and click its name. In the left navigation pane, choose Network > Ingresses.

    3. On the Ingresses page, view the endpoint of the Ingress.

  2. To test the service, use a browser or a command-line tool to access <Endpoint>/version or <Gateway public IP address>/version. For example, enter env-******-cn-hangzhou.alicloudapi.com/version in your browser.

Reference

For more information about the features of APIG Ingress and how it works, see Manage APIG Ingresses.