Deploy workloads as Knative Services to run applications that scale automatically with traffic, including scaling down to zero pods when idle. Knative Services are suited for web application hosting, serverless application deployment, AI tasks, and event-driven applications.
Prerequisites
Before you begin, make sure that you have:
-
Knative deployed in your ACK cluster. See Deploy and manage Knative.
Step 1: Deploy a Knative Service
Deploy a Knative Service using the ACK console or a YAML manifest.
Use the console
-
Log on to the ACK console. In the left navigation pane, click ACK consoleClusters.
-
On the Clusters page, click the name of your cluster. In the left navigation pane, choose Applications > Knative.
-
On the Services tab, select the target namespace from the top navigation bar, and then click Create Service.
-
Configure the following parameters and click Create.
Parameter Description Service Name A name for the Knative Service. Image Name Click Select Image to choose a container image from your registry. You can also enter a private image in the format domainname/namespace/imagename:tag. To follow this example, useregistry-vpc.cn-hangzhou.aliyuncs.com/knative-sample/helloworld-go:73fbdd56(replacecn-hangzhouwith your region).Access Protocol The protocol for the Service. Supported values: HTTP and gRPC. Container Port The container port to expose. Valid range: 1–65535. Advanced Click Advanced to configure scaling, resources, lifecycle, environment variables, and volumes. See the table below.
Use the YAML editor
-
On the Services tab, click Create from YAML in the upper-right corner.
-
Paste your YAML content into the editor and click Create. The following example creates a Knative Service named
helloworld-go:apiVersion: serving.knative.dev/v1 kind: Service metadata: name: helloworld-go spec: template: spec: containers: - image: registry-vpc.cn-hangzhou.aliyuncs.com/knative-sample/helloworld-go:73fbdd56 # Replace the region with your actual one. env: - name: TARGET value: "Knative"
After creation, view, update, or delete the Service from the Services tab.
Step 2: Access the Knative Service
After deployment, access the Service by mapping its domain name to the gateway IP address.
-
On the Services tab, click the name of the Service. In the Basic Information section, note the gateway IP address and the domain name assigned to the Service.

-
Add an entry to your local hosts file to point the Service's domain name to the gateway IP address. For example:
121.xx.xxx.xx helloworld-go.default.example.com -
After you modify the hosts file, use the domain name to access the Knative Service.

What's next
-
Use a custom domain name — map a production domain name to your Knative Service.
-
Configure a certificate to access Services over HTTPS — enable HTTPS with a TLS certificate.
-
Create a revision — manage multiple versions of your Service using revisions.
-
Enable auto scaling to withstand traffic fluctuations — configure request-based auto scaling rules.
-
Use elastic container instances in Knative — handle traffic spikes by bursting to elastic container instances.
-
Knative Eventing — set up event-driven workloads with Knative Eventing.