【问题标题】:How to use "move2kube collect" command?如何使用“move2kube collect”命令?
【发布时间】:2022-01-22 16:04:35
【问题描述】:

我是 movetokube 工具的新手。我很难理解 move2kube collect 命令是如何工作的。 web site 没有关于此命令的任何文档,这非常令人惊讶。我想在 Cloud Foundary 集群中安装所有应用程序,我希望 move2kube 通过 move2kube collect 命令(或不?)来做到这一点。我不确定是否必须在 Cloud Foundary 集群或 K8 集群上执行 move2kube 命令。请帮忙!

我正在 CF 集群上执行以下 move2kube 命令

move2kube 收集

我看到以下错误

INFO[0000] Begin collection
INFO[0000] [*collector.ClusterCollector] Begin collection
WARN[0001] Error while fetching storage classes using command [/usr/local/bin/kubectl get sc -o yaml]
ERRO[0001] API request for server-group list failed
WARN[0001] Failed to retrieve preferred group information from cluster
WARN[0001] Failed to collect using the API. Error: "Get \"https://cluster02.someserver.com:8443/api?timeout=32s\": failed to refresh token: oauth2: cannot fetch token: 401 \nResponse: {\"error\":\"unauthorized\",\"error_description\":\"Bad credentials\"}" . Falling back to using the CLI.
ERRO[0001] Error while running kubectl api-resources: exit status 1
WARN[0001] Failed to collect using the CLI. Error: "exit status 1"
WARN[0001] [*collector.ClusterCollector] failed. Error: "exit status 1"
INFO[0001] [*collector.ImagesCollector] Begin collection
INFO[0001] [*collector.ImagesCollector] Done
INFO[0001] [*collector.CFContainerTypesCollector] Begin collection
WARN[0002] Error while getting buildpacks : exit status 1
WARN[0002] Unable to collect buildpacks from cf instance : exit status 1
ERRO[0002] exit status 1
WARN[0002] Unable to find used buildpacks : exit status 1
INFO[0004] [*collector.CFContainerTypesCollector] Done
INFO[0004] [*collector.CfAppsCollector] Begin collection
ERRO[0004] exit status 1
WARN[0004] [*collector.CfAppsCollector] failed. Error: "exit status 1"
INFO[0004] Collection done
INFO[0004] Collect Output in [/home/mytest/move2kube/samples/m2k_collect]. Copy this directory into the source directory to be used for planning.

【问题讨论】:

    标签: kubernetes cloud-foundry move2kube


    【解决方案1】:

    来自the move2kube GitHub page

    用法

    一步简单的方法

    move2kube transform -s src

    两步法

    1. 计划:将源代码放在一个目录中 src 并生成计划。例如,您可以使用samples 目录。 move2kube plan -s src
    2. 变换 : 在同一个目录下, 调用以下命令。 move2kube transform

    注意:如果有关任何运行时实例的信息是云代工厂或 kubernetes 集群 需要收集使用move2kube collect。您可以将 在计划中使用的src 目录中收集数据。

    来自the article Introducing Konveyor Move2Kube on Medium

    Move2Kube 使用情况

    Move2Kube 将源工件和 输出目标部署工件。

    Move2Kube 完成了 以上活动采用三步法

    1. 收集 : 如果运行时 需要检查,move2kube collect 将分析您的运行时 Cloud Foundry 或 kubernetes 等环境,提取所需的 元数据并将它们作为 yaml 文件输出到 m2k_collect 文件夹中。

    ...

    【讨论】:

    • 您在注释部分提到的关于 move2kube collect 的点非常重要,因为这在我在互联网上看到的任何文档中都不是很清楚。
    猜你喜欢
    • 1970-01-01
    • 2016-04-20
    • 2021-07-23
    • 1970-01-01
    • 1970-01-01
    • 2017-02-26
    • 2020-06-23
    • 1970-01-01
    • 2021-12-25
    相关资源
    最近更新 更多