Skip to main content

Migrate AKS Workload using the Console

This topic describes migrating your existing Kubernetes workloads into an Ocean cluster via the Ocean console.

Before starting, review the prerequisites.

Step 1: Select Instances to Migrate

  1. In the left main menu, click Ocean and click Cloud Clusters.

  2. Select a cluster from the list of clusters.

  3. Click Start Migration on the right under Ocean Managed Nodes.

note

Worker nodes are the main compute resources running containerized applications in a Kubernetes cluster. System nodes (or master nodes) are the control plane components that manage the overall Kubernetes cluster and the workloads running on the worker nodes. The regular nodes are the on-demand nodes. The recommendation is to migrate the unmanaged worker nodes to become Ocean-managed Nodes. In the example above, before migration, there are no Ocean-managed nodes.

Once you start the migration, Ocean automatically detects the workloads (nodes and pods) of the associated Kubernetes cluster and displays a list of all the discovered nodes.

user-attachment

The list of discovered nodes contains these columns:

  • Migration Node: Node for migration.
  • Node Group.
  • Pod Count: Number of pods on node.
  • Virtual Node Group Match: Indicates whether an existing virtual node group in the cluster matches the node.
  • Ready for Migration (Node Statuses):
    • Ready for migration: Node is validated and can be migrated (green color).
    • Excluded: Node was not selected for migration (gray color).
    • Unable to migrate: Node cannot be migrated (red color).
    • Requires validation: Nodes are checked before migration to ensure successful migration. If an issue is identified for a node, you can either fix it or select a different node.

Node validation checks for the following:

  • Virtual Node Group Match: At least one virtual node group in the cluster must match the specific node.
  • Support for the Kubernetes version.
  • Support for the Ocean Controller version.
  • Whether Spot toleration exists.
  • Specific Constraints: For example, Restrict Scale Down, Respect Pod Disruption Budget (PDB), PVC.
  1. Select the nodes (instances) you want to migrate into your Ocean cluster.
  2. If any selected node entries display the Required Validation status in the Ready for Migration column, click Validate at the bottom left of the screen.
  3. When the validation process is completed, check if any node entries display the Unable to migrate status in the Ready for Migration column.
  1. Fix any required nodes Ocean cannot migrate (see below) before you Click Next.

What to do about nodes that Ocean cannot migrate:

If the virtual node group match column displays No match and has a click to edit link, the node does not contain labels and taints attributes that match any configured virtual node group in the cluster.

To edit:

  1. Click the link. An issues dialog box displays the labels and taints required for a virtual node group in your cluster to match the selected node.

  2. Click Create New VNG to create a virtual node group that contains these injected attributes. See how to configure a virtual node group in the edit screen.

note

The new virtual node group's other attributes are inherited from the virtual node group template.

If the virtual node group Match column shows No match (but there is no link), the tooltip shows the reason for the mismatch. Spot recommends checking your Azure workloads related to the Ocean virtual node group configuration to ensure they are correct and resolve any mismatches.

If you drill down to a workload under a node and the Spot toleration is missing message appears, Install the admission mutating webhook that injects the required spot toleration, which AKS requires to run pods on spot nodes:

To do this, click Actions > Spot Toleration Injection (top-right of screen).

note

If no nodes pass the validation process, you must fix errors before migrating. You can migrate if at least 1 of the selected nodes is successfully validated.

Step 2: Set Preferences

Select your workload migration preferences.

migration-preferences

  • Batch Size Percentage: Indicates the percentage of the cluster's target capacity that will be migrated during migration (per batch). For example, if the cluster's target capacity is 50 nodes, and the Batch Size Percentage is set to 20%, each batch will consist of 20% of the target capacity, 10 nodes (50 nodes * 20% = 10 nodes).
  • Batch Size Healthy Percentage: indicates the minimum percentage of (migrated) healthy nodes in a single batch. The migration will fail if the number of healthy nodes in a single batch is below this percentage. The range is 1-100; if the parameter value is null, the default value will be 50%. Instances that were not replaced due to PDB will be considered as healthy. You can override the behavior of the batchMinHealthyPercentage parameter by setting the ignorePdb parameter to True
  • Evict stand-alone Pods: Ocean evicts pods that are not part of a Kubernetes deployment and will automatically reschedule these stand-alone pods.
  • Respect Pod Disruption Budget (PDB): Some pods may have a Pod Disruption Budget. In the Spot API, use respectPdb to instruct Ocean to verify the PDB. When respectPdb is set to True, Ocean will not migrate a node if the PDB is violated.
  • Respect Restrict Scale Down during Roll: Rolls do not consider the restrict-scale-down label. Ocean will migrate a node even if a task or pod uses this label. Ocean's Autoscaler considers all configured constraints before the roll.
  • Delete node from Azure after successful migration: Select to delete the node from the Azure console because Ocean now manages the node.
note

Before migration, the Azure-managed node pools are changed from automatic to manual scaling to avoid conflicts.

Step 3: Start Migration

  • Click Start Migration.

Step 4: View the Workload Migration Dashboard

Follow the migration in the dashboard.

Migration in Process

Node Statuses:

  • In Progress: Migration has started (dark blue color)
  • Migrated: Node has been migrated (green color).
  • Not Migrated: Node was not migrated due to stopped migration, or was manually excluded for migration (gray color).
  • To be Migrated: Node has not yet been migrated (light blue color)
  • Failed: Migration failed (red color)

Stop Migration

You can stop a migration in progress. However, migrated workloads remain under the new Spot nodes. Spot completes scheduling all the unscheduled pods of the current batch, and undrained nodes become schedulable again.

To stop the migration:

  1. Click Stop Migration on the right of the screen (above the nodes list).
  2. Click Terminate Drained Instances if you want Ocean to terminate the already drained nodes before stopping the entire process.

View Previous Migrations

To view previous migrations (for the past month):

  • Click Actions > Previous migration history on the top-right of the screen, or click Migrations History (from the workload migration dashboard).

The list of migrations displays:

  • Migration ID.
  • Start Date of migration.
  • Number of migrated nodes (x/y). Click the link to display the dashboard for that migration.
  • Status of the migration.
    • Completed: All nodes were migrated.
    • Partly migrated (in progress): At least one selected node was not migrated.
    • Stopped: Migration was manually stopped.
    • Failed: Migration failed.