All Products
Search
Document Center

Container Compute Service:Use Kourier Ingresses in Knative

Last Updated:Mar 26, 2026

Kourier Ingresses are lightweight gateways built on Envoy and provided by the open-source Knative community. Use Kourier to distribute traffic across Knative revisions and configure gRPC services, timeouts and retries, Transport Layer Security (TLS) certificates, and external authorization services.

Prerequisites

Before you begin, ensure that you have:

Step 1: Deploy a Kourier Ingress

  1. Log on to the ACS console. In the left-side navigation pane, click Clusters.

  2. On the Clusters page, find the cluster that you want to manage and click its ID. In the left-side navigation pane of the cluster details page, choose Applications > Knative.

  3. On the Components tab, click Deploy Knative, select Kourier, and follow the on-screen instructions to complete the deployment.

Step 2: Access a service through the Kourier Ingress

This section creates a Knative Service named helloworld-go and shows how to access it over HTTP or HTTPS.

Create the helloworld-go service

  1. Log on to the ACS console. In the left-side navigation pane, click Clusters.

  2. On the Clusters page, find the cluster that you want to manage and click its ID. In the left-side navigation pane of the cluster details page, choose Applications > Knative.

  3. On the Services tab of the Knative page, set Namespace to default, click Create from Template, copy the following YAML content to the template editor, and click Create.

    apiVersion: serving.knative.dev/v1
    kind: Service
    metadata:
      name: helloworld-go
    spec:
      template:
        spec:
          containers:
          - image: registry.cn-hangzhou.aliyuncs.com/knative-sample/helloworld-go:73fbdd56
            env:
            - name: TARGET
              value: "Knative"

    When the Status column of the service displays Created, the service is deployed.

  4. On the Services tab, record the domain name and gateway IP address of helloworld-go from the Default Domain and Gateway columns.

Access the service over HTTP

Run the following command to access the helloworld-go service over HTTP. Replace the gateway IP address and domain name with the values you recorded.

curl -H "Host: helloworld-go.default.example.com" http://8.141.XX.XX

Expected output:

Hello Knative!

Access the service over HTTPS

The steps below use a self-signed certificate and are intended for testing. For production environments, configure an automatically managed certificate instead. See Configure a certificate to access services over HTTPS.
  1. Generate a TLS certificate and private key:

    openssl genrsa -out tls.key 4096
    openssl req -subj "/CN=*.example.com/L=*.example.com" -sha256 -new -key tls.key -out tls.csr
    echo subjectAltName = DNS:helloworld-go.default.example.com,DNS:helloworld-go.default.example.cn > extfile.cnf
    openssl x509 -req -days 3650 -sha256 -in tls.csr -signkey tls.key -out tls.crt -extfile extfile.cnf
  2. Create a Secret named kourier-cert in the knative-serving namespace from the certificate:

    kubectl -n knative-serving create secret tls kourier-cert --key tls.key --cert tls.crt
  3. Verify that the net-kourier-controller Deployment exists in the knative-serving namespace:

    kubectl get deployments -n knative-serving

    Confirm that net-kourier-controller appears in the output.

  4. Configure the certificate on the net-kourier-controller Deployment:

    kubectl -n knative-serving edit deployment net-kourier-controller

    In the editor, set the following environment variables under the net-kourier-controller container's env section:

    ...
       spec:
          containers:
          - env:
            - name: CERTS_SECRET_NAMESPACE
              value: knative-serving
            - name: CERTS_SECRET_NAME
              value: kourier-cert
    ...
  5. Verify that the net-kourier-controller pod is running:

    kubectl -n knative-serving get po

    Expected output:

    NAME                               READY   STATUS    RESTARTS   AGE
    net-kourier-controller-******   1/1     Running   0          10s
  6. Access the helloworld-go service over HTTPS. Replace the gateway IP address and domain name with the values you recorded.

    curl -H "Host: helloworld-go.default.example.com" -k --cert tls.crt --key tls.key //8.141.XX.XX

    Expected output:

    Hello Knative!

(Optional) Step 3: View the Knative monitoring dashboard

Knative provides out-of-the-box monitoring. On the Knative page, click the Monitoring Dashboards tab to view monitoring data for a specific service. See View the Knative dashboard.

image.png

What's next