When you need to run Java applications on Kubernetes without managing cluster infrastructure directly, Enterprise Distributed Application Service (EDAS) provides full lifecycle management on top of Container Service for Kubernetes (ACK). Instead of building container images and writing Kubernetes manifests manually, you upload a JAR or WAR package and EDAS handles the containerization and deployment.
This topic describes how to create an ACK cluster, import it into EDAS, and deploy a Java application using a demo JAR or WAR package.
Workflow
| Step | Task | Description |
|---|---|---|
| 1 | Prerequisites | Activate EDAS and ACK, create a microservice namespace, grant required roles |
| 2 | Create an ACK cluster | Create a managed Kubernetes cluster in the ACK console |
| 3 | Import the cluster to EDAS | Synchronize and import the cluster so EDAS can manage deployments |
| 4 | Deploy the application | Configure and deploy a Java application using a JAR or WAR package |
| 5 | Verify the deployment | Confirm that pods are running |
| 6 | Next steps | Expose the application through a load balancer |

Prerequisites
Before you begin, make sure that you have:
An Alibaba Cloud account with EDAS activated and ACK activated
ACK default roles granted to your account
Step 1: Create an ACK cluster
Log on to the ACK console and create a managed Kubernetes cluster. For instructions, see Create a managed Kubernetes cluster.
To create an ACK Serverless cluster that supports Alibaba Cloud Service Mesh (ASM) after import to EDAS, set VPC to Create VPC and Service Discovery to PrivateZone. If you set VPC to Select Existing VPC, verify that the cluster has VPC and vSwitch resources after creation. For details, see Create an ACK Serverless cluster.
Step 2: Import the ACK cluster to EDAS
When you import an ACK cluster, EDAS automatically installs the following components:
| Component | Purpose |
|---|---|
| ack-ahas-sentinel-pilot | Application protection (throttling and degradation) |
| ack-arms-pilot | Application Real-Time Monitoring Service (ARMS) agent |
| ack-arms-prometheus | Prometheus monitoring agent |
To import the cluster:
Log on to the EDAS console. In the left-side navigation pane, choose Resource Management > Container Service Kubernetes Clusters.
In the top navigation bar, select the region where your ACK cluster resides, and then click Synchronize Container Service Kubernetes Cluster.
Find the synchronized cluster and click Import in the Actions column.
In the Precheck for Import dialog box, click Continue.
In the Import Kubernetes Cluster dialog box, select a microservice namespace from the Microservice Namespace drop-down list. Turn Service Mesh on or off based on your requirements, and then click Import.
The import is complete when the cluster shows Running in the Cluster Status column and Imported in the Import Status column.
Step 3: Deploy the application
The deployment procedure is the same for JAR and WAR packages. The following steps use a JAR package as an example.
3a. Create the application
Log on to the EDAS console. In the left-side navigation pane, choose Application Management > Applications.
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.
3b. Configure basic information
In the Basic Information step, configure the following parameters, and then click Next.
| Parameter | Description |
|---|---|
| Cluster Type | Select Kubernetes Clusters. |
| Application Source Type | Select Default. |
| Hosted Applications | Select the programming language. Select Java for this example. For PHP or multilingual applications, see Build PHP applications from source code and deploy them in ACK clusters. |
| Select Application | Select a runtime environment based on your application type. See the options below. |
Runtime environment options:
| Option | Use case | Configurable parameters |
|---|---|---|
| Java | Deploy a Dubbo or Spring Boot application with a universal JAR package | Java Environment |
| Tomcat | Deploy a Dubbo or Spring application with a universal WAR package | Java Environment, Container Version |
| EDAS-Container (HSF) | Deploy a High-Speed Service Framework (HSF) application with a WAR or FatJar package | Java Environment, Pandora Version, Ali-Tomcat Version |
For image-based deployment, see Use an image to deploy a Java microservices application in a Kubernetes cluster.
OpenJDK 17 is compatible with Dubbo 2.7.14 and later, or Dubbo 3.0.6 and later. See the compatibility matrix below.
OpenJDK 17 compatibility matrix
| Dubbo version | Spring Boot version | Nacos client version | API call | ARMS monitoring | Service list |
|---|---|---|---|---|---|
| 2.7.14 | 2.7.9 | 1.4.4 | Supported | Supported | Supported |
| 2.7.14 | 2.7.9 | 2.1.2 | Supported | Supported | Supported |
| 2.7.14 | 2.7.9 | 2.2.0 | Supported | Supported | Supported |
| 2.7.22 | 2.7.9 | 1.4.4 | Supported | Supported | Supported |
| 2.7.22 | 2.7.9 | 2.1.2 | Supported | Supported | Supported |
| 2.7.22 | 2.7.9 | 2.2.0 | Supported | Supported | Supported |
| 3.0.6 | 2.7.9 | 1.4.4 | Supported | Supported | Supported |
| 3.0.6 | 2.7.9 | 2.1.2 | Supported | Supported | Supported |
| 3.0.6 | 2.7.9 | 2.2.0 | Supported | Supported | Supported |
| 3.1.7 | 2.7.9 | 1.4.4 | Supported | Supported | Supported |
| 3.1.7 | 2.7.9 | 2.1.2 | Supported | Supported | Supported |
| 3.1.7 | 2.7.9 | 2.2.0 | Supported | Supported | Supported |
3c. Configure the deployment
In the Configurations step, set the environment, deployment method, and resource parameters, and then click Next.
Environment and cluster settings
| Parameter | Description |
|---|---|
| Microservice Namespace | Select the namespace you created. Defaults to Default if not specified. To create one, click Create Microservice Namespace. See the "Create a namespace" section of Manage microservice namespaces. |
| Cluster | Select the imported ACK cluster. If the cluster has not been imported, select This cluster is used for the first time in EDAS to import it during application creation. Then, check whether Alibaba Cloud Service Mesh is activated. First-time import takes additional time. |
| K8s Namespace | Select a Kubernetes namespace for resource isolation. Options: default (used if not specified), kube-system (system-created objects), kube-public (readable by all users, including unauthenticated users). To create a custom namespace, click Create Kubernetes Namespace. The name must be 1--63 characters: lowercase letters, digits, and hyphens (-), starting and ending with a letter or digit. |
The cluster and the application do not need to belong to the same microservice namespace.
Application settings
| Parameter | Description |
|---|---|
| Application Name | Must start with a letter. Can contain letters, digits, and hyphens (-), up to 36 characters. |
| Application Description | Optional. Up to 128 characters. |
Deployment package
| Parameter | Description |
|---|---|
| Source of Deployment Package | Choose one of the following options: |
Custom Program: Upload a JAR package or provide a package URL.
Upload JAR Package: Select and upload a local package.
JAR Package Address: Enter the URL of your deployment package.
Official Demo: Select a demo application type -- Spring Cloud Server Application, Spring Cloud Client Application, Dubbo Server Application, or Dubbo Client Application.
Container registry (ACK clusters only)
The Container Registry Repository Type parameter is available only for Java, Tomcat, or EDAS-Container (HSF) applications in ACK clusters. It is not available for ACK Serverless clusters.
Before using a container registry, make sure that:
The aliyun-acr-credential-helper component is installed
For Container Registry Enterprise Edition, VPC access is configured
Select Container Registry Personal Edition or Container Registry Enterprise Edition to store the built image. The image build task runs in your cluster with the following scheduling rules:
| Node label or taint | Behavior |
|---|---|
edas.image.build=disable (label) | EDAS does not schedule build tasks to these nodes |
edas.image.build=enable (label) | EDAS preferably schedules build tasks to these nodes, but may also use unlabeled nodes |
key=edas.image.build, effect=NoSchedule (taint) | Build tasks can tolerate this taint |
To prevent build tasks from running on specific nodes, add the edas.image.build=disable label. To create a dedicated build node, add both the edas.image.build=enable label and the key=edas.image.build, effect=NoSchedule taint.
The default resource limit for a single image build task is 1 GB per core. To adjust this limit, see How do I adjust resource limits for image building?
Container Registry Enterprise Edition parameters:
| Parameter | Description |
|---|---|
| Region of Container Registry | Select the region of your Container Registry image. |
| Container Registry | Select your container image. |
| Image Repository Namespace | Select a namespace, or click + Create Namespace to create one. |
Resource and runtime settings
| Parameter | Description |
|---|---|
| Version | Specify a custom version number, or click Use Timestamp as Version Number to generate one. |
| Time Zone | Select the application time zone. |
| OpenJDK Base Image | Available only when Java Environment is set to Custom OpenJDK in the Basic Information step. Configure the image source: If you set Alibaba Cloud Container Registry to Current Account, configure the Region, Container Registry, Image Repository Namespace, and Image Repository Name parameters and select an image version. If you set it to Other Alibaba Cloud Accounts, specify the Full Image Address. Only JDK 7 and JDK 8 are supported. Using a different JDK version may cause exceptions with the application monitoring feature. The EDAS server pulls the base image to build an application image. Make sure that the base image has public pull permissions. |
| Total Pods | The number of pods to deploy. The maximum depends on cluster capacity. |
| Single-pod Resource Quota | CPU, memory, and ephemeral storage limits per pod. A value of 0 means no limit. Maximum values depend on cluster capacity. |
3d. Configure advanced settings (optional)
In the Advanced Settings step, configure any of the following as needed:
3e. Start the deployment
Click Create Application. In the Creation Completed step, click Create Application again.
In the Confirm Application Change Precheck dialog box, click Start Precheck.
Review the precheck results and click Continue. If you modified any precheck items, click Check Again before proceeding.
Verify the deployment
The deployment takes several minutes. To monitor progress and confirm success:
Go to the Change List page to track deployment status in real time.
After the deployment finishes, go to Application Management > Applications and open your application. On the Application Overview page, check the pod status.
If all pods show a running state, the deployment succeeded. Click the pod status to view Deployments, pods, and advanced configuration details for each application instance.
Next steps
After you deploy the application, bind a Classic Load Balancer (CLB) instance to expose it:
Internet access: Add an Internet-facing CLB instance so external users can reach the application over the public network.
Internal access: Add an internal-facing CLB instance so other services in the same Virtual Private Cloud (VPC) can reach the application.
For instructions, see Bind CLB instances or Reuse a CLB instance.