All Documents
Current Document

Content is empty

If you don't find the content you expect, please try another search term

Documentation

Use an EPC instance

Last updated:2021-05-25 17:26:04

KCE allows you to add Elastic Physical Compute (EPC) instances as nodes to a KCE cluster. If containers run on high-performance EPC instances, performance loss caused by virtualization can be avoided and robust performance experience can be guaranteed for you.

Usage notes

  • KCE does not create EPC instances. You need to manually create EPC instances in the EPC console. You can add EPC instances to a cluster only after the cluster is created.
  • KCE supports all types of EPC instances.
  • The container agent must be installed on the EPC instances.

Install the container agent on an EPC instance

When you create an EPC instance to be added to a KCE cluster, you must install the container agent. You can add an EPC instance to a cluster only after you install the container agent on the EPC instance.

Kubernetes and Docker require the specific kernel versions of images. Therefore, you can install the container agent only on EPC instances that start with the specified images.

Standard images

CentOS 7.3 or later

Ubuntu 18.04

Custom images

By default, Kingsoft Cloud does not allow you to install the container agent on EPC instances that use custom images. If you need to use a custom image, submit a ticket and provide information about the custom image. The KCE team verifies the custom image. If the custom image meets the requirements of Kubernetes, Kingsoft Cloud provides the option for you to install the container agent on EPC instances that use the custom image.

Procedure

Create an EPC instance

  1. Log in to the EPC console.
  2. Click +EPC.
  3. Follow the steps to set the EPC information. In the Set Basic Information step, select the option for installing the container agent, as shown in the following figure.

image20210430174652424.png

Note

  • The EPC instance must be in the same VPC as the cluster to which the EPC instance is to be added.
  • The container agent must be installed.

Add the EPC instance to a cluster

  1. Log in to the KCE console.
  2. In the left navigation pane, click Cluster.
  3. Click the name of a cluster to go to the cluster management page.
  4. In the left navigation pane, choose Manage Nodes > Node. The Node page appears.
  5. Click Add EPC node.
  6. On the Add EPC node page, configure the following parameters and click Add to Cluster.
    • Container Storage Directory: Customize a directory to store container and image data. We recommend that you store container and image data in a data disk. If you do not customize a directory, container and image data is stored in the /data/docker directory by default.
    • (Optional) Advanced Settings: Set the following parameters as required:
      • Scrip to Run Before Deployment: Specify custom data to configure the node, namely, specify the script to run before you deploy the node. You must ensure the reentrancy and retry logic of the script. You can view the script and its log files in the /usr/local/ksyun/kce/pre_userscript directory of the node.
      • Scrip to Run After Deployment: Specify custom data to configure the node, namely, specify the script to run after you deploy the node. You must ensure the reentrancy and retry logic of the script. You can view the script and its log files in the /usr/local/ksyun/kce/userscript directory of the node.
      • Cordon: Specify whether to cordon a worker node as required. After you cordon a worker node, new pods will not be scheduled to the node. To schedule new pods to the node, uncordon the node. For more information, see Cordon or drain a node.
      • Label: Customize a label as required.
    • Select the EPC instance.

Note: An EPC instance must meet the following requirements before it can be added to a cluster:

  • The EPC instance has the container agent installed.
  • The EPC instance is in the running status.
  • The EPC instance is in the same VPC as the cluster.
  • The subnet where the EPC instance resides has a public NAT.
  • The EPC instance is not added to other clusters.

Remove an EPC node from a cluster

You can remove an EPC node from a cluster. On the Node page, find the EPC node and click Remove Node in the Operation column to remove the node.

Note

  • When you remove a node, the Kubernetes-related components are uninstalled from the node. The operation takes effect 1 minute later. Do not repeat the operation.
  • The EPC node is removed from the cluster, but the EPC instance is not deleted. To delete the EPC instance, go to the EPC console to perform the operation.
  • A removed EPC node can be added to the cluster again.

Support for GPU EPC instances

KCE supports NVIDIA GPUs and Cambricon devices.

NVIDIA GPUs

To allow Kubernetes to support NVIDIA GPUs, you must install the NVIDIA driver and CUDA. We recommend that you install the preceding software on the GPU EPC instance before you add it to a Kubernetes cluster.

Note

  • When you create a NVIDIA GPU-powered EPC instance, you must install the container agent.
  • If the NVIDIA driver and CUDA are not installed on the GPU EPC instance, KCE installs the NVIDIA driver and CUDA 10.1 on the instance by default when you add the instance to a cluster. During the installation, the GPU EPC instance is automatically restarted.

Cambricon devices

Cambricon Kubernetes Device Plugin is developed based on the device plug-in architecture introduced in Kubernetes versions later than 1.8. You can install the device plug-in on an EPC instance or run it as a DaemonSet to manage MLU resources, without changing the source code of Kubernetes. The device plug-in can automatically report the number of MLU100 devices, track their health status, and run MLU-enabled containers.

Note

  • The Kubernetes version must be later than 1.8.
  • After you create a Cambricon device-powered EPC instance, install optional Kubernetes standard components, and add it to a Kubernetes cluster, the KCE team installs the required software such as the Cambricon driver on the instance. The instance does not need to be restarted during the installation process. Then, pods can be scheduled to the instance.
On this page
Pure ModeNormal Mode

Pure Mode

Click to preview the document content in full screen
Feedback