Background information

Kompose is an open source tool for converting Swarm compose files to Kubernetes resource files. We have improved Kompose to support parameters that are specific to Alibaba Cloud.

After Kubernetes resource files are generated, you can Connect to Kubernetes clusters through kubectl and deploy these files to a Kubernetes cluster.

Kompose and kubectl are always required to migrate application configurations. We recommend that you install Kompose and kubectl on a dedicated ECS instance.

Procedure

  1. Install Kompose.

    Kompose is a tool for converting Swarm compose files to Kubernetes resource files. We have improved Kompose to support parameters that are specific to Alibaba Cloud. For more information about Kompose, see AliyunContainerService/kompose.

    Installation: Download the latest executable file from GitHub based on your operating system. The GitHub address is as follows: AliyunContainerService/kompose/releases.
    kompose-linux-amd64
    Kompose
  2. Set up kubectl.
    1. Download the latest kubectl client from the Kubernetes change log page.
    2. Install and set up the kubectl client. For more information, see Install and set up kubectl.
    3. Configure cluster credentials.
      1. Log on to the Container Service console. In the left-side navigation pane, choose Clusters > Clusters. Select the target cluster and click Manage in the Actions column.
      2. On the Basic Information page, copy and paste the KubeConfig content to $HOME/.kube/config on your local machine.
    4. After the setup is complete, run the following commands to check whether the installation is successful and cluster credentials are correctly configured.
      kubectl version
      
      kubectl cluster-info

Result

If the output is as shown in the following red box, it indicates that kubectl is properly installed.Environment is ready