This topic describes how to migrate application configurations from Swarm to Kubernetes after operations and maintenance (O&M) engineers have migrated cluster configurations. The following steps are required: set up the environment, pre-process and convert Swarm compose files, deploy Kubernetes resource files, manually migrate application configurations that cannot be automatically converted, and debug the application to fix potential issues.

Comparison between reserved instances, pay-as-you-go instances, and subscription instances

Swarm and Kubernetes both use various concepts in terms of applications, services, and access methods. For more information about the differences between these concepts, see Concepts.


An application is required to be migrated from Swarm to Kubernetes. A Kubernetes cluster with the same cluster configurations is created for the application. In this topic, an application named swarm-piggymetrics is used as an example and its configurations are migrated to the Kubernetes cluster named k8s-piggymetrics-cluster.

Based on PiggyMetrics, swarm-piggymetrics is an application built on a microservice architecture. PiggyMetrics is a Spring Cloud project on GitHub.


  1. Set up the environment.
  2. Pre-process Swarm compose files.
  3. Convert Swarm compose files.
  4. Deploy Kubernetes resource files.
  5. Manually migrate application configurations.
  6. Debug application startup.
  7. Migrate log configurations of applications.

Related topics

For more information about migration-related questions, see Troubleshooting.

For more information about the mapping of labels, see Application configuration parameters, Application release labels, Network configuration labels, and Log configuration parameters.