All Products
Search
Document Center

Elastic Container Instance:Getting started with Elastic Container Instance

Last Updated:Jun 13, 2022

This topic describes how to get started with Elastic Container Instance.

Get started with Elastic Container Instance by using the Container Service - Kubernetes console

Elastic Container Instance is seamlessly connected to Kubernetes to provide a hierarchical solution for Kubernetes. In this solution, Elastic Container Instance schedules and manages underlying pods, and Kubernetes serves as a Platform as a Service (PaaS) layer on top of Elastic Container Instance to manage workloads. To connect Elastic Container Instance to Kubernetes, you can use one of the following methods:

  • Run Kubernetes pods exclusively on Elastic Container Instance

    You need to deploy a Serverless Kubernetes (ASK) cluster to make the entire Kubernetes cluster run on Elastic Container Instance. This eliminates the need to focus on operations and maintenance (O&M) and capacity of underlying virtual machines (VMs).

  • Run Kubernetes pods on both Elastic Container Instance and traditional servers

    You can connect Elastic Container Instance to Kubernetes clusters by deploying virtual nodes (VNodes) to improve the resource usage and elasticity of the clusters and reduce running costs.

For more information, see Connect Elastic Container Instance to Kubernetes.

If you know about Kubernetes or plan to deploy your business in Kubernetes, we recommend that you deploy and manage your business in Container Service for Kubernetes (ACK) or ASK clusters.

After you create ASK clusters in the Container Service - Kubernetes console, you can deploy applications in the ASK clusters. Each pod that is generated when you deploy the applications runs on a dedicated elastic container instance. Perform the following steps:

  1. Activate ASK and grant required permissions. For more information, see Authorization overview.

  2. Create an ASK cluster. For more information, see ASK quick start.

  3. Create an application from an image. For more information, see Create an application from an image.

  4. Create a Service. For more information, see Create a Service.

  5. View pods. For more information, see View pods.

After you create ACK clusters in the Container Service - Kubernetes console, you must deploy VNodes in the ACK clusters and then schedule applications to the VNodes. Each pod in the VNodes runs on a dedicated elastic container instance. Perform the following steps:

  1. Activate ACK and grant required permissions. For more information, see Authorization overview.

  2. Create an ACK managed cluster. For more information, see Create an ACK managed cluster.

  3. Deploy a VNode. For more information, see Deploy the virtual node controller and use it to create elastic container instance-based pods.

  4. Run Jobs on elastic container instances. For more information, see Use an elastic container instance to run a Job.

Get started with Elastic Container Instance by using the Elastic Container Instance console

If your business does not require features such as container orchestration, load balancing, timed scheduling, and auto scaling, you can use the Elastic Container Instance console or call Elastic Container Instance API operations to manage elastic container instances. Perform the following steps:

  1. (Optional) Activate Elastic Container Instance and grant permissions to RAM users.

    If you use a RAM user to perform operations, you must first use your Alibaba Cloud account to grant permissions to the RAM user. For more information, see Grant permissions to RAM users.

  2. Create an elastic container instance.

    Before you create an elastic container instance, take note of the following items:

    • You must select a region and zone based on your business needs, and create a virtual private cloud (VPC), vSwitch, and security group before you can create an elastic container instance.

    • If Internet access is required, you must associate a Network Address Translation (NAT) gateway or an elastic IP address (EIP) with the VPC in which the elastic container instance is located, or associate an EIP with the instance.

    For more information, see the following topics:

    Note

    When the system creates image caches and the elastic container instance, the system automatically creates the service-linked role AliyunServiceRoleForECI to obtain access permissions on resources such as Elastic Compute Service (ECS), Virtual Private Cloud (VPC), Container Registry, Log Service, and Server Load Balancer (SLB). For more information, see Elastic Container Instance service-linked role.

  3. Use the elastic container instance.

    After an elastic container instance is created, you can view the events and logs of the instance and debug containers in the instance. For more information, see the following topics: