Enterprise Distributed Application Service (EDAS) fully integrates with Container Service for Kubernetes (ACK) based on cloud-native Kubernetes. EDAS allows you to manage the full lifecycle of Kubernetes containerized applications. Serverless Kubernetes clusters are applicable to scenarios in which agility is important and can be used to process individual and multiple tasks. This topic describes how to use an image to deploy an application in a ACK Serverless cluster.
Prerequisites
EDAS and ACK are activated for your Alibaba Cloud account. For more information, see the following topics:
ACK default roles are granted to your account. For more information, see ACK default roles.
Step 1: Create an ASK cluster
Log on to the ACK console and create an ACK Serverless cluster. For more information, see Create an ASK cluster.
Step 2: Import an ASK cluster to the EDAS console
By default, the ack-ahas-sentinel-pilot, ack-arms-pilot, and ack-arms-prometheus components are installed when you import an ACK cluster to EDAS in the EDAS console. The ack-ahas-sentinel-pilot component is an application protection component for throttling and degradation. The ack-arms-pilot component is an Application Real-Time Monitoring Service (ARMS) component. The ack-arms-prometheus component is a Prometheus monitoring component.
Log on to the EDAS console. In the left-side navigation pane, choose .
In the top navigation bar, select the region and the microservice namespace in which your ASK cluster resides. Then, click Synchronize Serverless Kubernetes Cluster.
Find the ACK Serverless cluster that is synchronized to EDAS and click Import in the Actions column.
In the Warning message, click OK.
In the Precheck for Import dialog box, click Continue.
In the Import Kubernetes Cluster dialog box, select the microservice namespace to which you want to import the ACK Serverless cluster from the Microservice Namespace drop-down list, turn on or off Service Mesh based on your business requirements, and then click Import.
If the value in the Cluster Status column is Running and the value in the Import Status column is Imported for the ACK Serverless cluster, the cluster is imported to EDAS.
Step 3: Deploy an application in the ACK Serverless cluster
Log on to the EDAS console. In the left-side navigation pane, choose . In the top navigation bar, select a region. In the upper part of the page, select a microservice namespace. In the upper-left corner of the Applications page, click Create Application.
In the Basic Information step, configure the parameters in the Cluster Type and Application Runtime Environment sections and click Next.
In the Configurations step, configure the environment information, basic information, deployment method, and resource parameters for the application and click Next.
Parameter
Description
Microservice Namespace
The microservice namespace in which you want to deploy the application. Select the microservice namespace that you created. If you do not have or select a microservice namespace, this parameter is set to Default.
If you have not created a microservice namespace or you want to create another microservice namespace, click Create Microservice Namespace to create a microservice namespace. For more information, see the "Create a namespace" section of the Manage microservice namespaces topic.
Cluster
The cluster in which you want to deploy the application. Select a Kubernetes cluster from the Cluster drop-down list.
If the selected Kubernetes cluster is not imported to EDAS, select This cluster is used for the first time in EDAS. If you select this check box, the cluster is imported to EDAS when an application is created. This consumes a certain amount of time. Then, check whether Alibaba Cloud Service Mesh is activated.
NoteYou can select a cluster that does not belong to the same microservice namespace as the application.
K8s Namespace
The Kubernetes namespace of the application. Internal system objects are allocated to different Kubernetes namespaces to form logically isolated projects, teams, or user groups. This way, different groups can be separately managed and share the resources of the entire cluster. Valid values:
default: the default Kubernetes namespace. If you do not specify a Kubernetes namespace for an object, the default Kubernetes namespace is used.
kube-system: the Kubernetes namespace for the objects that are created by the system.
kube-public: the Kubernetes namespace that is automatically created by the system. This Kubernetes namespace can be read by all users, including unauthenticated users.
In this example, select default.
If you want to create a custom Kubernetes namespace, click Create Kubernetes Namespace. In the dialog box that appears, enter a name for the Kubernetes namespace in the K8s Namespace field. The name can contain digits, lowercase letters, and hyphens (-), and can be 1 to 63 characters in length. It must start and end with a letter or a digit.
Application Name
The name of the application. The name must start with a letter and can contain digits, letters, and hyphens (-). The name can be up to 36 characters in length.
Application Description
The description of the application. The description can be up to 128 characters in length.
Image Type
The type of the image that is used to deploy the application. Valid values: Configure Image
If you set the Alibaba Cloud Container Registry parameter to Current Account, perform the following operations:
Configure the Region, Container Registry, Image Repository Namespace, and Image Repository Name parameters and select an image version.
If you set the Alibaba Cloud Container Registry parameter to Other Alibaba Cloud Accounts, perform one of the following operations:
If your image is stored in a public repository, specify the Full Image Address parameter.
If your image is stored in a private repository, use the aliyun-acr-credential-helper component to pull a container image. For more information, see Use the aliyun-acr-credential-helper component to pull images without secrets.
Demo Image
If you select this option, you must use a demo image provided by EDAS and select an image version.
NoteDemo images are not provided for Apsara Stack.
NoteBefore you use the images in a repository of Container Registry Enterprise Edition to deploy applications as a RAM user, the RAM user must obtain the required permissions from the relevant Alibaba Cloud account. For more information, see Configure policies for RAM users to access Container Registry.
Total Pods
The number of pods on which you want to deploy the application. The maximum number of pods is subject to the cluster performance.
Single-pod Resource Quota
The CPU, memory, and ephemeral storage that you want to reserve for a pod. If you want to specify a limit, enter a numeric value. The default value 0 specifies that no limit is imposed. The maximum quotas of CPU, memory, and ephemeral storage are subject to the cluster performance.
(Optional) In the Advanced Settings step, configure the advanced settings.
- Important
If you use JDK 11, configure the
one-agent.jdk.version: OpenJDK11
annotation.If you use JDK 17, configure the
one-agent.jdk.version: OpenJDK17
annotation.
After you configure the advanced settings, click Create Application. In the Creation Completed step, click Create Application.
In the Confirm Application Change Precheck dialog box, click Start Precheck.
After the data in the dialog box is refreshed, confirm the precheck items and results and click Continue.
(Optional) If you modify the preceding precheck items, click Check Again.
The application requires several minutes to be deployed. During the process, you can view the change records to track the deployment progress of the application on the Change List page. After you deploy the application, go to the Application Overview page to view the running status of pods. If the pods are in the running state, the application is deployed. You can click the running status of pods to view the Deployments, pods, and advanced configurations of the application instances.
What to do next
After you deploy the application, add an Internet-facing Server Load Balancer (SLB) instance to allow access to the application over the Internet. You can also add an internal-facing SLB instance so that all the nodes in the same VPC can access the application by using this internal-facing SLB instance. For more information, see Bind CLB instances or Reuse a CLB instance.
DingTalk group for ACK and Serverless Kubernetes clusters in EDAS
If you have questions or suggestions when you use Container Service for Kubernetes (ACK) and Serverless Kubernetes clusters in EDAS, submit a ticket. To give feedback, you can also join the DingTalk group by searching for the DingTalk group ID 23197114
.