Enterprise Distributed Application Service (EDAS) fully integrates Container Service for Kubernetes on the basis of cloud-native Kubernetes. EDAS supports full lifecycle management of Kubernetes containerized applications. A Container Service Kubernetes cluster integrates capabilities of Alibaba Cloud in virtual machines, storage, networking, and security, and provides an excellent runtime environment for Kubernetes containerized applications. This topic describes how to use custom images to deploy applications in a Container Service Kubernetes cluster.

Prerequisites

Step 1: Create a Container Service Kubernetes cluster

Log on to the Container Service for Kubernetes console and create a Container Service Kubernetes cluster. For more information, see Create a managed Kubernetes cluster.

To create a Serverless Kubernetes cluster, set VPC to Create VPC and set Service Discovery to PrivateZone. This allows the Serverless Kubernetes cluster to use Alibaba Cloud Service Mesh after the cluster is imported to EDAS. If you set VPC to Select Existing VPC, check whether the cluster contains the virtual private cloud (VPC) and vSwitch resources after you create the cluster.

Create a Serverless Kubernetes cluster.

Step 2: Import the Container Service Kubernetes cluster to 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, choose Resource Management > Container Service Kubernetes Clusters.
  3. In the top navigation bar, select the region where you want to import the cluster, and click Synchronize Container Service Kubernetes Cluster.
  4. In the Actions column of the Container Service Kubernetes cluster that you want to import, click Import.
  5. In the Import Kubernetes Cluster dialog box, select the destination namespace from the Namespace drop-down list, turn on or off Service Mesh, and then click Import.
    If the value of Cluster Status is Running and the value of Import Status is Imported. for the Container Service Kubernetes cluster, the Container Service Kubernetes cluster is imported to EDAS.

Step 3: Create an application in the Container Service Kubernetes 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, set Cluster Type and Application Runtime Environment, 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 is selected as the application runtime environment and Custom is selected for image-based deployment in the example.
    • Custom: Select this option if you want to deploy an application in a Kubernetes cluster by using a custom image.
    • Java: Select this option if you want to deploy a Dubbo or Spring Cloud application in a Kubernetes cluster by using a universal JAR package. You can change the value of Java Environment after you select this option.
    • Tomcat: Select this option if you want to deploy a Dubbo or Spring Cloud application in a Kubernetes cluster by using a universal WAR package. You can change the values of Java Environment and Container Version after you select this option.
    • EDAS-Container (HSF): Select this option if you want to deploy a High-Speed Service Framework (HSF) application by using a WAR or FatJar package. You can change the values of Java Environment, Pandora Version, and Ali-Tomcat Version after you select this option.
  4. In the Configurations step, configure the environment information, basic information, and deployment mode for the application, set the related resource parameters, and then click Next.
    Application configuration in a Kubernetes cluster for deployment based on an image
    Parameter Description
    Namespace Select the namespace that you created. If you have not created a namespace or do not select a namespace, this parameter is set to Default.
    Cluster From the drop-down list, select the imported Container Service Kubernetes 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 share the resources of the whole cluster when they are separately managed.
    • default: The default namespace. When an object is not configured with a namespace, default is used.
    • kube-system: The namespace used by 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 users, including users who are not authenticated.

    In this example, default is used.

    Application Name Enter the application name. The name must start with a letter and can contain digits, letters, and hyphens (-). The application name can be up to 36 characters in length.
    Application Description Enter the description of the application. The description can be up to 128 characters in length.
    Image Type
    • Configure Image
      • Set Alibaba Cloud Container Registry to Current Account.

        Set Region, Container Registry, Image Repository Namespace, Image Repository Name, and the image version.

      • Set Alibaba Cloud Container Registry to Other Alibaba Cloud Accounts.
    • Demo Image

      Select a demo image provided by EDAS and select an image version.

    Total Pods Set the number of pods that you want to deploy for the application.
    Single-pod Resource Quota Set the parameters of the CPU and the memory for a pod. To set the quota for each of them, enter a specific number. The default value 0 indicates no quota limit.
  5. Optional. Configure information in the Advanced Settings step.
  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.