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 an image to deploy an application in an ASK 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: Create an application in the ASK cluster

  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.
    Use an image to deploy a Kubernetes application
    Parameter Description
    Cluster Type Select Kubernetes Clusters.
    Application Runtime Environment In this topic, Java and Custom are selected in an example to use a custom image 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 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 an image 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.
    Image Type
    • Configure Image
      • Select Current Account for the Alibaba Cloud Container Registry parameter.

        Specify the Region, Container Registry, Image Repository Namespace, Image Repository Name parameters and specify the image version.

      • Select Other Alibaba Cloud Accounts for the Alibaba Cloud Container Registry parameter.
    • Demo Image

      Specify a demo image provided by EDAS and select a version of the demo image.

    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 it for Internet access. You can also add an internal-facing SLB instance so that all nodes in the same VPC can access your application by using this internal-facing SLB instance. For more information, see Bind SLB instances or Reuse an SLB instance.