Help Center/ Huawei Cloud Flexus/ User Guide/ FlexusCCI/ Creating a Container Service
Updated on 2024-08-28 GMT+08:00

Creating a Container Service

You can buy FlexusCCI and create containers on the console. You only need to specify container images and compute resource specifications required by container services to run various applications (from simple web applications to multi-layer microservices).

Procedure

  1. Log in to the FlexusCCI console.
  2. In the upper right corner of the page, click Buy FlexusCCI.
  3. Configure the parameters.

    • Basic Configuration
      Table 1 Basic configuration for a container service

      Parameter

      Description

      Billing Mode

      Only pay-per-use is available.

      Region

      Select the region where FlexusCCI will be used. Cloud service products in different regions cannot communicate with each other over a private network. Select a nearest location for low latency and fast access.

    • Container Setting
      There are two ways to create containers: using a template or specifying the configuration.
      Table 2 Parameters for creating a container using a template

      Parameter

      Description

      Configuration Type

      Select Template. There are three options: Nginx, Hello World, or WordPress.

      Container Name

      • The container name cannot be changed after creation. If you need to change the name, create another container.
      • Enter 1 to 63 characters. Start and end with a letter or digit. Use only lowercase letters, digits, and hyphens (-).

      Port

      • Nginx port number: 80
      • Hello World port number: 80
      • WordPress port numbers: TCP 80 or TCP 3306

      Public Network Setting

      Container port: 80

      Table 3 Parameters for creating a container by specifying the configuration

      Parameter

      Description

      Configuration Type

      Select Custom Configuration. Specify the container information as required.

      Container Name

      • The container name cannot be changed after creation. If you need to change the name, create another container.
      • Enter 1 to 63 characters. Start and end with a letter or digit. Use only lowercase letters, digits, and hyphens (-).

      SWR Image Address

      • My Images: images that you have uploaded to SWR. For details, see Uploading an Image Through a Client.
      • Open Source Images: public images in the image center.
      • Shared Images: images shared by others through SWR.
        NOTE:
        • If you are an IAM user, you need to request permissions by referring to Organization Management before using private images in the account.
        • Currently, FlexusCCI does not support third-party image repositories.
        • A single layer of the decompressed image must not exceed 20 GB.

      Image Tag

      Select an available image tag.

      Startup Command

      (Optional) Enter the container startup command, which will be executed upon container startup. Startup commands correspond to the ENTRYPOINT startup instructions of the container engine.

      Container Port

      • The port ranges from 1 to 65535. You can specify the listening port of the application as the container port.
      • The protocol can be TCP or UDP. This parameter is optional.

      Environment Variables

      • Variable Name: Enter a name of the environment variable.
      • Value: Enter a value. This parameter is optional. Environment variables provide great flexibility for applications. You can assign values to environment variables when creating containers. The values will be read when containers are running.

      Public Network Setting

      Specify the container port that will be mapped to the port on the EIP. In this way, the container can be accessed from the Internet.

    • Flavor

      Two flavors are available: 2 vCPUs and 4-GiB memory and 4 vCPUs and 16-GiB memory. Set this parameter based on the runtime of the application.

      After a container service is created, the flavor cannot be changed.

    • Container Service Name

      The name must be unique. Enter 1 to 63 characters starting and ending with a letter or digit. Only lowercase letters, digits, hyphens (-), and periods (.) are allowed. Do not enter consecutive periods or place a hyphen before or after a period.

      A container service can contain multiple containers.

  4. Click Buy Now.