Enterprise Distributed Application Service (EDAS) integrates with Container Service for Kubernetes (ACK) on the basis of cloud native Kubernetes. EDAS allows you to manage the full lifecycle of Kubernetes containerized applications. Serverless Kubernetes (ASK) clusters are applicable to agile business scenarios that require fast scaling. This topic describes how to use a demo JAR package or a demo WAR package provided by EDAS to deploy an application in an ASK cluster.

Background information

To deploy an application in an ASK cluster, create an ASK cluster in the ACK console. Then, import the cluster in the EDAS console, and use a package or an image to deploy the application in the imported cluster.

Workflow of deploying an application in a Kubernetes cluster

Prerequisites

Step 1: Create an ASK cluster

Log on to the ACK console and create an ASK cluster. For more information, see Create an ASK cluster.

Step 2: Import the ASK cluster in the EDAS console

By default, the ack-ahas-sentinel-pilot, ack-arms-pilot, and ack-arms-prometheus components are installed when you add a Kubernetes 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) monitoring component. The ack-arms-prometheus component is a Prometheus monitoring component.

  1. Log on to the EDAS console.
  2. In the left-side navigation pane of the EDAS console, choose Resource Management > Serverless Kubernetes Clusters.
  3. In the top navigation bar, select the region where the namespace you want to use is located. From the Namespace drop-down list, select the namespace to which you want to import the cluster. Then, click Synchronize Serverless Kubernetes Cluster.
  4. In the Actions column that corresponds to the imported ASK cluster, click Import.
    If the ASK cluster is in the Running state and the value in the Import Status column for the ASK cluster is Imported, the ASK cluster is imported to EDAS as expected.

Step 3: Deploy the application in the ASK cluster

Note The procedure of deploying the application by using a WAR package is the same as the procedure of deploying the application by using a JAR package. In this topic, a JAR package is used in an example to describe how to deploy the application.
  1. Log on to the EDAS console.
  2. In the left-side navigation pane, click Applications. In the top navigation bar, select a region. In the upper part of the page, select a namespace. In the upper-left corner of the Applications page, click Create Application.
  3. In the Basic Information step, specify the Cluster Type and Application Runtime Environment parameters for the application that you want to create and click Next.
    Specify the application basic information
    Parameter Description
    Cluster Type Select Kubernetes Clusters.
    Application Runtime Environment In this example, Java is selected to use a JAR package to deploy the application.
    • Custom: Select this option if you want to use a custom image to deploy the application to a Kubernetes cluster.
    • Java: Select this option if you want to use a universal JAR package to deploy the application as a Dubbo or a Spring Boot d application. You can specify the Java Environment parameter after you select this option.
    • Tomcat: Select this option if you want to use a universal WAR package to deploy the application as a Dubbo or a Spring application. You can specify the Java Environment and Container Version parameters after you select this option.
    • EDAS-Container (HSF): Select this option if you want to use a WAR or FatJar package to deploy the application as a High-Speed Service Framework (HSF) application. You can specify the Java Environment, Pandora Version, and Ali-Tomcat Version parameters after you select this option.
  4. In the Configurations step, configure the environment information, basic information, deployment method, and resource parameters for the application, and click Next.
    Application configuration - use a JAR package to deploy the application to the Kubernetes cluster
    Parameter Description
    Namespace Select a namespace that you have created. If you have not created a namespace or do not select a namespace, the namespace is set to Default.
    Cluster From the drop-down list on the right side, select the imported ASK cluster.
    K8s Namespace Internal system objects are allocated to different namespaces to form logically isolated projects, groups, or user groups. This way, different groups can be separately managed and can also share the resources of the entire cluster.
    • default: The default namespace. If no namespace is specified for an object, the default namespace is used.
    • kube-system: The namespace of the objects that are created by the system.
    • kube-public: The namespace that is automatically created by the system. This namespace can be read by all the users, including the users who are not authenticated.

    In this example, default is selected.

    Application Name Enter an application name. The name must start with a letter and can contain digits, letters, and hyphens (-). The name must be 1 to 36 characters in length.
    Application Description Enter a description of the application. The description can be a maximum of 128 characters in length.
    Source of Deployment Package
    • Custom Program
      Specify the File Uploading Method parameter.
      • Upload JAR Package: Select and upload the JAR package that you have downloaded.
      • JAR Package Address: Enter the address of the demo package.
    • Official Demo

      EDAS provides the following demo types: Spring Cloud Server Application, Spring Cloud Client Application, Dubbo Server Application, and Dubbo Client Application. Select a demo type based on your needs.

    Version Enter a version number. You can specify a version number or click the Use Timestamp as Version Number button.
    Time Zone Specify a time zone for the application.
    Total Pods Specify the number of pods on which the application is to be deployed.
    Single-pod Resource Quota Specify the amount of CPU and memory resources that you want to reserve for a pod. To set a limit, enter a numeric value. The default value 0 indicates that no limit is set.
  5. Optional. In the Advanced Settings step, specify the advanced settings.
  6. Click Create Application.
    It takes several minutes to create the application. During the process, you can view the change records to track the progress of creating the application. For more information, see View application overview. After the application is created, the Application Overview page appears. You can check the status of the instance pod. If the pod is in the Running state, the application is released as expected. You can click the status of the pod to view the advanced settings of the application instance, such as Deployment, Pod, and Startup Command.

What to do next

After the application is created, you can add an Internet-facing Server Load Balancer (SLB) instance to enable the access to the application over the Internet. You can also add an internal-facing SLB instance so that all the nodes in the same virtual private cloud (VPC) can access the application by using this internal-facing SLB instance. For more information, see Add an SLB instance to an application in a Kubernetes cluster.