All Products
Search
Document Center

Elastic Container Instance:General workflows to use Elastic Container Instance

Last Updated:Sep 26, 2023

You can connect Elastic Container Instance to your existing business systems by calling API operations, and then deploy containerized applications in the Elastic Container Instance console or by calling API operations. You can also use Virtual Kubelet to connect Elastic Container Instance to Kubernetes, and then use the scaling capabilities of Elastic Container Instance to handle burst traffic. This topic describes how to use elastic container instances in different scenarios.

Use elastic container instances by using the Elastic Container Instance console, by using SDKs or by calling API operations

If your business does not require Kubernetes features, such as container orchestration, load balancing, and time-based scheduling, you can use elastic container instances by using the Elastic Container Instance console, by using SDKs, or by calling API operations. For more information about feature description and configuration examples, see Use Elastic Container Instance based on the console and API.

Console mode

This mode is suitable for beginners. You can use this mode if you are not familiar with Elastic Container Instance. You can follow the on-screen instructions to create elastic container instances and try the container running capabilities of the instances. For more information about how to use elastic container instances in the console mode, see Use Elastic Container Instance in the console.

SDK or API mode

You can use this mode if you do not use Kubernetes. You can use the OpenAPI Explorer to call API operations. You can also install SDKs for Java, Python, and Go to create elastic container instances. For information about how to use an SDK for Java, see Use an SDK to create an elastic container instance.

Use Elastic Container Instance in Container Service for Kubernetes (ACK)

Elastic Container Instance is seamlessly integrated into ACK. You can use ACK Serverless clusters or ACK clusters to try the container running capabilities of Elastic Container Instance. For more information about feature description and configuration examples, see Use Elastic Container Instance based on ACK.

Deploy an ACK Serverless cluster to exclusively run Kubernetes pods on Elastic Container Instances

An ACK Serverless cluster is a Kubernetes cluster whose pods exclusively run on elastic container instances. In an ACK Serverless cluster, you can create pods without the need to manually deploy virtual nodes. Each pod that runs in an ACK Serverless cluster is an elastic container instance. For more information about how to use Elastic Container Instance in ACK Serverless clusters, see Use Elastic Container Instance based on ACK Serverless.

ASK

Procedure:

  1. Create an ACK Serverless cluster.

  2. Prepare a container image.

  3. Create an application.

    • Create an application in the ACK console.

    • Create an application by using kubectl on CloudShell.

    • Obtain the kubeconfig file and use the kubectl client to create an application.

Deploy an ACK cluster to run Kubernetes pods on ECS and Elastic Container Instance

An ACK cluster is a Kubernetes cluster that runs on an Elastic Compute Service (ECS) instance by default. In an ACK cluster, you must deploy a virtual node based on the Virtual Kubelet component before you can create an Elastic Container Instance pod. Each pod that runs on a virtual node is an elastic container instance.

ACK+ECI

Procedure:

  1. Create an ACK cluster.

  2. Deploy the ack-virtual-node component to generate a virtual node.

  3. Prepare a container image.

  4. Create an application.

    • Create an application in the ACK console.

    • Create an application by using kubectl on CloudShell.

    • Obtain the kubeconfig file and use the kubectl client to create an application.

Use elastic container instances in a self-managed Kubernetes cluster

If you created self-managed Kubernetes clusters in a data center or on an ECS instance, you can deploy VNodes-based virtual nodes to use elastic container instances. VNodes are compatible with native Kubernetes API operations. Each pod that runs on a VNode is an elastic container instance. For more information about the feature description and configuration examples, see Use Elastic Container Instance based on self-managed Kubernetes clusters.

vnode
Note

You are charged for each VNode that you create. Each VNode has a resident node that is equivalent to an elastic container instance of 2 vCPUs and 8 GiB. You are charged for VNodes based on the equivalent elastic container instances.

Procedure:

  1. Configure the base environment.

  2. Deploy VNodes.

  3. Prepare a container image.

  4. Use the kubectl client to create an application.