Help Center/ Migration Center/ Best Practices/ Collecting Details of Google Cloud GKE Resources
Updated on 2024-11-18 GMT+08:00

Collecting Details of Google Cloud GKE Resources

Before migrating Google Kubernetes Engine (GKS) resources, use MgC to collect resource details, which are necessary for subsequent migration. This section describes the basic principles, preparations, account permission requirements, and specific operations for using MgC to collect GKE resource details efficiently and accurately.

Collection Principles

Figure 1 illustrates how to use MgC to collect GKE resource details.
Figure 1 Principle for collecting GKE resource details
  1. Through the SDK provided by GCP, MgC calls GKE APIs to obtain information about resources such as container instances, regions, networks, and subnets.
  2. MgC receives API call responses, which typically contain extensive resource data.
  3. MgC parses the returned data and extracts key information, such as the number of nodes and subnet segments. Then, the key information is saved to the database for subsequent analysis and migration.

Preparations

  • Preparing a Huawei account

    Before using MgC, prepare a HUAWEI ID or an IAM user that can access MgC. For details about how to register a HUAWEI ID and create an IAM user, see Preparations.

  • Creating a migration project

    Create a migration project (a simple project is recommended) on the MgC console. For details, see Managing Migration Projects.

  • Preparing Google Cloud account credentials

    Obtain the credentials (key file) of the Google Cloud account to which the GKE resources belong.

  • Providing the source credentials

    Add the key file of the Google Cloud account as the collection credential on the MgC console. For details, see Managing Credentials. Select Configuration File and upload the key file of the Google Cloud account. The file must be in JSON format and the file size cannot exceed 4 KB.

Account Permission Requirements

Before collecting details of GKE resources, ensure that the Google Cloud account has the following permissions:

  • container.clusters.list
  • compute.regions.get
  • compute.networks.list
  • compute.subnetworks.list

Procedure

Create a discovery task on the MgC console. For details, see Discovering Resources over the Internet.