Knative FAQ

更新时间:
复制 MD 格式

This topic answers frequently asked questions (FAQs) about using Knative in ACK clusters.

Table of contents

Alibaba Cloud Knative vs. open source Knative

Alibaba Cloud Knative is compatible with open source Knative and provides enhancements in areas such as operations, usability, elasticity, Ingress, eventing, and monitoring. For more information, see Comparison of Alibaba Cloud Knative and open source Knative.

Choosing an Ingress for Knative

Alibaba Cloud Knative supports three types of Ingresses: Application Load Balancer (ALB), Service Mesh (ASM), and Kourier. ALB is designed for application-layer load balancing. ASM provides service mesh (Istio) capabilities. If you only need basic Ingress functionality, you can choose Kourier. For more information, see Select a Knative Ingress.

Required permissions for RAM users and roles

Using Knative requires permissions to access all cluster namespaces. Follow these steps to grant the permissions.

  1. Log on to the ACS console. In the left navigation pane, choose Authorizations.

  2. Click the RAM Users tab. In the list of RAM users, find the target RAM user and click Modify Permissions in the Actions column.

  3. In the Add Permissions panel, select the cluster to which you want to grant permissions, set Namespace to All Namespaces, and complete the authorization.

Pod scale-to-zero duration

Three main parameters determine how long a pod takes to scale to zero:

  • stable-window: A stabilization period. Before scaling down, the autoscaler observes metrics during this window to avoid reacting to transient fluctuations.

  • scale-to-zero-grace-period: The grace period before scaling to zero. During this period, the system keeps the last pod running even if there are no new requests. This helps handle sudden traffic bursts.

  • scale-to-zero-pod-retention-period: The retention period for the last pod before scaling to zero. This allows the pod to quickly serve sudden traffic without a cold start.

A pod scales to zero only when all of the following three conditions are met:

  1. No requests are received during the stable-window.

  2. The scale-to-zero-pod-retention-period has elapsed.

  3. The time since Serverless Kubernetes (ASK) entered proxy mode has exceeded the configured scale-to-zero-grace-period.

A pod is retained for no more than stable-window + Max("scale-to-zero-grace-period", "scale-to-zero-pod-retention-period"). To enforce a specific retention time, configure the scale-to-zero-pod-retention-period parameter.

Is the Knative Activator component billed?

Yes. The Activator component is part of the data plane, runs as pods, and consumes your instance resources.

Configuring the service listening port

The application's listening port must match the containerPort value in the Knative Service, which defaults to 8080. To use a custom listening port, see Configure a custom listening port in Knative.