All Products
Search
Document Center

API Gateway:Create and Use APIG Ingress to Expose Services Externally

Last Updated:Dec 02, 2026

APIG Ingress is built on the cloud-native API gateway and exposes Services inside a cluster to users.

Important

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

Scope

Install APIG Controller

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

  2. On the Clusters page, click the name of your cluster. In the left navigation pane, click Components and Add-ons .

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

  4. In the Install Component APIG Controller dialog box, configure the parameter settings, and then click OK.

    • Create:

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

      Important
      • When you select Create, the add-on creates a new ApigConfig resource and a cloud-native API gateway instance by default. The lifecycle of ApigConfig is bound to the cloud-native API gateway instance. Deleting the ApigConfig resource triggers a cascade delete of the cloud-native API gateway instance bound to it. Do not delete the ApigConfig resource arbitrarily.

      • If an IngressClass resource named apig already exists in the cluster, the ApigConfig resource and the cloud-native API gateway instance are not automatically created.

    • Select Existing VPC :

      From the displayed list, select a pay-as-you-go cloud-native API gateway instance that resides in the same VPC as the container cluster and is not associated with another cluster. If the target instance does not appear in the selection list, check whether the instance is already associated with another cluster. An associated instance does not appear in the selectable list. In this case, select Create to create a new cloud-native API gateway instance.

    If Failed to pass the precheck. occurs during the add-on installation, Authorize the APIG controller.
  5. After the add-on is installed, you can see an ApigConfig resource named apig-controller-pro-{clusterid} in the cluster. Log on to the cloud-native API gateway console. In the corresponding region, you can see a cloud-native gateway instance named apig-controller-pro-{clusterid}.

Create a sample application

  1. On the Clusters page, click the name of your cluster. In the left navigation pane, click Workloads > Deployments.

  2. On the Deployments page, click Create from YAML. For example, use the following YAML sample 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
      type: ClusterIP
  3. In the pop-up message, click View and verify that the Pod status is Running. 

Configure APIG Ingress

  1. On the Ingresses page, click Create Ingress.

  2. In the Create Ingress dialog box, set Gateway Type to APIG Ingress, set Ingresses to Prefix Match, set Path to /, forward requests to the Service httpbin, and then click OK.

  3. On the Ingresses page, view the endpoint information of the new Ingress in the Endpoint column. Use a browser, a CMD command, or another command line interface to access Endpoint domain name/version or Gateway public IP/version to test the Service. If the returned content is version: v1, the Ingress is configured correctly.

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

References

For more information about APIG Ingress and how it works, see APIG Ingress management.