---
title: "Create Migration"
method: POST
path: "/ocean/aws/k8s/cluster/{oceanClusterId}/migration"
tags: ["Ocean AWS"]
---

# Create Migration

`POST /ocean/aws/k8s/cluster/{oceanClusterId}/migration`

Create a migration for a given existing instances.

## Parameters

- `#/paths/~1azure~1costs/get/parameters/0` — unresolved $ref
- `#/paths/~1ocean~1aws~1ecs~1cluster~1%7BoceanClusterId%7D/get/parameters/1` — unresolved $ref

## Request body

- object
  - `migration` object, required — Migration update configuration.
    - `instanceIds` string[], required — A list of instance ids that should be migrated to the Ocean cluster.
    - `shouldTerminateDrainedNodes` boolean, required — Ocean will terminate the old instances once the pods that reside on them are migrated, and the old instances are fully drained.
    - `shouldEvictStandAlonePods` boolean, required — Ocean will terminate pods that do not belong to a Kubernetes deployment. This means that you would need to launch the pod manually (after the migration) due to the fact that there is no object that would do it automatically.
    - `forcePodEvictionOnPdbFailure` boolean, required — Ocean will force the Pod eviction from the instance, even if the distributed budget is not satisfied.
    - `batchSizePercentage` integer, required — Indicates (in percentage) the batch size of the migration (meaning, how many nodes to migrate in each batch).\ Cannot be null.

## Other responses

- `400` — Bad Request

---

[API](https://skmtc.net/spot/apis/spot-by-flexera-api.md) · [All operations](https://skmtc.net/spot/apis/spot-by-flexera-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/spot/spot-by-flexera-api/revisions/72813baf8d47/schema)
