Documentation

esc
    Move to Pantech / Move Kubernetes

    Move Kubernetes clusters

    Move the workloads of an EKS, GKE, AKS, DigitalOcean or other Kubernetes cluster into Pantech managed Kubernetes, with a read-only identity that never leaves your network, a dry-run preview, volume copies and a cutover.

    A Kubernetes move takes the workloads of one source cluster (its namespaces, Deployments, Services, Ingresses, volumes and the rest) and applies them to one of your Pantech Kubernetes clusters, rewritten for Pantech. The Pantech Migrate agent reads the source with a read-only identity that stays on your side. You preview the result as a dry run before anything is applied, copy volume data while the source keeps running, then cut over.

    It works with EKS, GKE, AKS and DigitalOcean Kubernetes, and any conformant cluster the agent can reach.

    You need:

    • a plan with the cluster as a kubernetes_cluster item. EKS clusters come from the AWS scan, with their version, node groups and add-ons;
    • a running Pantech cluster to move into. The plan's target suggests its version, node pools (the smallest plans that fit, with the same counts and autoscaling) and add-ons; create it first, and it bills as usual;
    • the Pantech Migrate agent running where it can reach the source cluster's API, enrolled for the plan's connection (any connection, AWS, Google Cloud, Azure and Huawei Cloud included), with a kubeconfig for the read-only identity below;
    • to be an Owner or Admin, and allowed to change the Pantech cluster (kubernetes:Update). It is checked when the move starts and again when it applies, syncs volumes or cuts over.

    The plan

    The cluster's Pantech version is the oldest one offered at or above the source's minor version. When the source is newer than every Pantech version, the newest is chosen and the item carries the blocking flag kubernetes_version_downgrade: check your workloads run on it, then set allow_version_downgrade: true on the item (edit the plan). A version that skips a minor is flagged kubernetes_version_upgrade, and the preview shows any API your manifests use that it no longer serves.

    The plan turns on the ingress-controller add-on when the source runs an ingress controller or any Ingress, metrics-server when it runs one or any HorizontalPodAutoscaler, and csi-driver when any volume claim exists. Windows node pools block the move (node_pool_windows); ARM and GPU node pools are flagged, since Pantech nodes are x86 without GPUs. The other flags are in scan and plan.

    1. Give the agent read-only access to the source

    GET /kubernetes-moves/source-access returns three manifests to apply to the source cluster:

    ManifestWhat it grants
    readerA namespace pantech-migrate, a ServiceAccount pantech-migrate-reader with a token, and a ClusterRole with only get, list and watch on the kinds a move reads. Not Secrets
    secrets_readerA separate ClusterRole, get and list on Secrets only. Apply it only if you want Secrets moved
    copierA ClusterRole, pantech-migrate-copier, to bind with a RoleBinding in each namespace whose volumes you copy. It can start pods, create Secrets, and change or delete only the one Secret named pantech-migrate-copy. It cannot delete pods, or touch any other object
    Terminal
    $ curl https://api.pantechdynamics.com/public/v1/kubernetes-moves/source-access \    -H "Authorization: Bearer $PANTECH_API_KEY" > source-access.json$ jq -r .reader source-access.json | kubectl apply -f -

    Give the agent a kubeconfig for pantech-migrate-reader, named in its configuration file:

    config.json
    {
      "kubernetes": {"kubeconfig": "/etc/pantech-migrate/reader.kubeconfig"}
    }

    Restart the agent after adding it; pantech-migrate-agent check confirms it can read the kubeconfig. The kubeconfig stays on the agent's machine: it is never uploaded, and no result carries its token or certificates. Kubeconfigs that use a credential plugin, as EKS, GKE and AKS ones do, work with the agent program: the plugin runs on your machine, as it does for kubectl. The container has no cloud tools, so give it a kubeconfig holding the reader's token instead.

    Before every export the agent asks the source cluster what its credential may do, and refuses to run with one that can create, change or delete anything beyond the copier's few rights. An admin kubeconfig given by mistake fails the move with source_credential_can_write instead of being used.

    2. Start the move

    Terminal
    $ curl -X POST https://api.pantechdynamics.com/public/v1/migrations/mig_06gk3x9tq7m2v8r4y1c5d0zp8w/kubernetes-moves \    -H "Authorization: Bearer $PANTECH_API_KEY" \    -H "Idempotency-Key: $(uuidgen)" \    -H "Content-Type: application/json" \    -d '{"item_key": "kubernetes_cluster:us-east-1:prod", "cluster_id": "k8s_06gk3x9tq7m2v8r4y1c5d0zp8w", "copy_volumes": true, "namespaces": ["shop", "payments"]}'
    FieldWhat it is
    item_keyThe plan's kubernetes_cluster item
    cluster_idA running Pantech cluster of yours
    include_secretsMove Secrets too. Off unless set; needs the secrets_reader manifest
    copy_volumesCopy volume data. Off unless set; needs the copier manifest in each namespace
    publish_load_balancersPublish public load balancers on the Pantech cluster as they were on the source. On unless set to false
    namespacesMove only these namespaces. All of them when left out

    The move is exporting while the agent reads the source. If no agent picks the export up within an hour it fails with agent_unavailable.

    What is exported

    Namespaces, Deployments, StatefulSets, DaemonSets, Jobs, CronJobs, Services, Ingresses, ConfigMaps, Secrets (only with include_secrets), PersistentVolumeClaims, HorizontalPodAutoscalers, PodDisruptionBudgets, NetworkPolicies, ServiceAccounts, namespaced Roles and RoleBindings, and CustomResourceDefinitions with their resources.

    Never exported: system namespaces (kube-* and the cloud's own), objects a controller made (their owner is moved instead), service account tokens, Helm's release records, Events, Endpoints, EndpointSlices, Leases, Nodes, PersistentVolumes, cluster-wide roles and bindings, and admission webhooks.

    The export is encrypted on the agent, before it leaves your network, so that only Pantech can open it, with encryption chosen to stay unreadable even if a copy were recorded today and attacked years from now. Pantech keeps only the encrypted copy, and deletes it once the move is applied or cancelled.

    How it is rewritten for Pantech

    SourceOn Pantech
    Volume claims of any storage class (gp3, standard-rwo, managed-csi, do-block-storage, …)local-path: the volume lives on one node's disk, and pods using it run on that node (volume_on_node_disk). ReadWriteMany and ReadOnlyMany claims are refused (access_mode_not_supported)
    type: LoadBalancer, publicA NodePort Service published on the cluster's public address with the same ports, when the cluster is in a VPC and the port is free (load_balancer_published). Otherwise load_balancer_needs_exposure: expose it after the apply
    type: LoadBalancer, internalA ClusterIP Service, reachable only inside the cluster (internal_load_balancer)
    Ingress classes (alb, gce, azure-application-gateway, traefik, nginx, none, …)nginx, Pantech's ingress controller, which the plan turns on. Cloud-only annotations are removed
    Node selectors and affinities on the cloud's node poolsThe matching Pantech node pool (pantech.io/node-pool). Zone and instance-type selectors are removed
    Workload identity (IRSA, GKE and Azure workload identity)Removed (workload_identity_manual): give those workloads credentials another way
    ImagesUnchanged. Images in a cloud's private registry are flagged private_registry_needs_pull_secret
    Custom resourcesKept, flagged custom_resource: install their controller on Pantech too

    Every annotation and label in a cloud's reserved prefixes, and in Pantech's own, is removed, so nothing imported can switch on a Pantech feature by itself. What the source cluster filled in (status, ids, versions, assigned addresses) is dropped too.

    3. Read the report

    GET /kubernetes-moves/{move_id} lists every object with what the move does with it: create, skipped or refused, its flags, and the preview's and apply's result. It shows names only, never ConfigMap or Secret values, environment values or pull credentials. It also lists the volumes with their copy progress, the images, and the workloads held back until the cutover.

    GET /kubernetes-moves/{move_id}/manifests downloads the rewritten manifests as one YAML file, for GitOps. Secrets are listed in it by name only.

    The cluster policy

    Pantech applies imported workloads with its own admin access, so the import holds every pod to the Kubernetes Pod Security Standard baseline. Refused: privileged containers, the host's network, processes or IPC, hostPath volumes, host ports, capabilities beyond the safe set, unmasked /proc, turning off seccomp or AppArmor, custom SELinux options and unsafe sysctls. Each refused workload says why, with policy_refused: true.

    To include one anyway, name it in allow_privileged when you preview. Only Owners and Admins can, it is recorded in the organization's activity log, and its namespace is labelled privileged. Never importable, whatever you choose: system namespaces, cluster-wide roles and bindings, admission webhooks, and Pantech's reserved labels and annotations.

    4. Preview

    Terminal
    $ curl -X POST https://api.pantechdynamics.com/public/v1/kubernetes-moves/kmv_06gk3x9tq7m2v8r4y1c5d0zp8w/preview \    -H "Authorization: Bearer $PANTECH_API_KEY" \    -H "Idempotency-Key: $(uuidgen)" \    -H "Content-Type: application/json" -d '{}'

    A preview is a server-side dry run of every object against your Pantech cluster: the cluster runs its admission checks, quotas and API versions, and keeps nothing. The one exception is the move's namespaces, which are created for real, empty and labelled, because an object can only be checked inside a namespace that exists. A custom resource whose definition the move installs is unverified until the apply. Preview as often as you like.

    5. Apply

    POST /kubernetes-moves/{move_id}/apply applies what the last successful preview checked, in order: definitions, namespaces, identities, configuration, storage, services, workloads, then routing (Ingresses, autoscalers, disruption budgets and network policies), then custom resources. A refused object stops its batch and is named.

    Workloads that mount a volume being copied are applied with no replicas, or suspended (held_until_cutover), so nothing starts on an empty volume. Namespaces the move creates are labelled to enforce the baseline policy, and to warn about anything below the restricted one.

    6. Copy the volumes

    With copy_volumes, the first copy of every volume starts by itself after the apply. The agent starts a copy pod next to each source volume, which reads it read-only, and a copy pod on the Pantech side writes it:

    • Each volume is copied in encrypted pieces, under a key made for that volume, and the pieces held on the way are deleted at the end of the move (and after 14 days regardless).
    • The Pantech side reads back what it wrote and checks it against the source's checksum of every file. A volume is synced only when the two match.
    • POST /kubernetes-moves/{move_id}/sync-volumes copies again, sending only what changed. Files deleted on the source are deleted on Pantech.

    Copy pods run with the least they need: never privileged, no host namespaces or paths, the source volume mounted read-only, no service account token, with time and resource limits. They are removed when they finish, fail, or the move is cancelled. A copy that runs longer than 24 hours stops with timed_out; sync again to resume. Revoking the agent does not stop a copy pod already running: cancel the move to remove it.

    The copier image

    On the source cluster, copy pods run only Pantech's copier image, ghcr.io/pantech-dynamics/pantech-migrate-copier, so the cluster's nodes must be able to pull it. Pantech chooses its version. The agent refuses to start a copy pod from any other image, whatever a job asks, and the volume fails with volume_copy_failed.

    kubernetes.copier_image in the agent's configuration names the one image copy pods may run instead. With it set, the agent runs exactly that image and refuses every other one, Pantech's included. If your nodes cannot pull from ghcr.io and you want to use a mirror, contact support before setting it, so your copies name the same image.

    7. Cut over

    1. Stop writes on the source.
    2. POST /kubernetes-moves/{move_id}/cutover with {"source_writes_stopped": true}. The move takes a last copy of every volume, then scales the held workloads up to their source replica counts.
    3. The move is completed. Point DNS at the Pantech cluster's public address.

    Cancel

    POST /kubernetes-moves/{move_id}/cancel stops the move and removes its copy pods on both clusters, its staged data and its export. Objects already applied to your Pantech cluster stay: they are yours, so delete them if you want.

    Statuses

    exporting → ready → previewing → ready → applying → applied → syncing → applied → cutting_over → completed. failed and cancelled are final. Troubleshooting explains every failure and refusal.

    Limits

    • 5 moves in progress per organization, and one per Pantech cluster.
    • 2,000 objects and 200 volumes per move; a larger cluster moves a few namespaces at a time.
    • The sealed export can be at most 32 MiB.

    The move is free. The Pantech cluster bills as usual from the moment it is created.

    Was this page helpful?

    Updated