This page covers common questions about using Knative in Alibaba Cloud Container Service for Kubernetes (ACS) clusters.
Index
Differences between Alibaba Cloud Knative and open source Knative
Alibaba Cloud Knative is compatible with open source Knative and adds enhanced capabilities for operations and maintenance (O&M), usability, elasticity, gateways, event-driven architecture, and monitoring and alerting. For details, see Comparison between Alibaba Cloud Knative and open source Knative.
Gateway selection for Knative installation
Alibaba Cloud Knative supports three gateway types:
| Gateway | Description | Best for |
|---|---|---|
| Application Load Balancer (ALB) | Optimized for application-layer load balancing. | Clusters that need application-layer routing or advanced traffic management. |
| Alibaba Cloud Service Mesh (ASM) | Provides a service mesh based on Istio. | Clusters that already have a service mesh or need full mesh capabilities. |
| Kourier | Lightweight gateway for basic routing. | Clusters that need only basic gateway features. |
For a full comparison, see the Knative gateway selection guide.
Required permissions for RAM users or roles to use Knative
Knative requires access to all namespaces in the cluster. To grant the permissions to a RAM user:
-
Log on to the ACS console. In the left navigation pane, choose Authorizations.
-
Click the RAM Users tab. Find the target RAM user and click Manage Permissions.
-
In the Add Permissions section, select the cluster, set Namespace to All namespaces, and follow the prompts to complete the authorization.
Time required for a pod to scale in to zero
How long it takes for a pod to scale in to zero depends on three parameters:
| Parameter | Description |
|---|---|
stable-window |
The observation window before scaling in. Knative evaluates metrics during this period and does not act immediately. |
scale-to-zero-grace-period |
The grace period during which the system does not immediately stop or delete the last pod even if there are no new requests. This prevents issues with burst traffic. |
scale-to-zero-pod-retention-period |
The minimum time the last pod is kept after traffic drops to zero. Configure this parameter to keep the pod available for burst traffic without a cold start. |
A pod scales in to zero only when all three conditions are met:
-
No requests are received within the
stable-window. -
The
scale-to-zero-pod-retention-periodhas elapsed. -
The time since SKS switched to proxy mode exceeds the
scale-to-zero-grace-period.
The total retention time before scale-in does not exceed stable-window + Max["scale-to-zero-grace-period", "scale-to-zero-pod-retention-period"]. To enforce a retention period before a pod scales in to zero, configure the scale-to-zero-pod-retention-period parameter.
Is the Activator component billed?
Yes. The Activator is a data plane component that runs as a pod and consumes instance resources, which are billable.
Configure the listening port for a Knative service
The application's listening port must match the containerPort defined in the Knative Service. The default port is 8080. To use a custom port, see Configure a custom listening port in Knative.