Version: next

Import / Export


This is a temporary solution, kalm will provide better import and export functions.

Sometimes we need to export an application, and reinstall it on another cluster. This is the way to export resource from KALM.


  • Make sure KALM installed to your cluster.
  • Make sure you have kubectl and configure to your cluster.

Export & import an application

Run the command as follow, a resource file that describe the application will be created $KALM_APP_NAME.bak.yaml

export KALM_APP_NAME=<name_of_exporting_applaction>
curl > ; bash $KALM_APP_NAME $KALM_APP_NAME.bak.yaml

Run the command as follow in another KALM (make sure that there is no application with the same name in KALM, otherwise there will be conflicts when import application), and the application you export will be imported in a few minutes.

kubectl apply -f $KALM_APP_NAME.bak.yaml

Migrate from one KALM to another

  1. Prepare a new KALM.
  2. Export all resource from old KALM
  3. Import all resource to new KALM

Run the following command to export all resource from old KALM.

curl > ; bash all-application kalm.bak.yaml

Run the following command to import all resource to new KALM (make sure in your new cluster, there is no application with the same name as the old cluster). *Persistent data will not be migrated such as postgresql data and some file that you mount on disks. If you want to migrate these data, you should through your own customized way.

kubectl apply -f kalm.bak.yaml
Last updated on by david