From 4520ce303994a137c47d9f619bc1a3a4bf4977fe Mon Sep 17 00:00:00 2001 From: Matt Wilder <me@partcyb.org> Date: Fri, 2 Apr 2021 13:21:47 -0700 Subject: [PATCH] Warn users of migrating without draining Warn users about migrating nodes without fully draining them of mounted EBS volumes. Signed-off-by: Matt Wilder <me@partcyb.org> --- docs/README.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/docs/README.md b/docs/README.md index 84e30bea26..5f0f62c29c 100644 --- a/docs/README.md +++ b/docs/README.md @@ -161,12 +161,14 @@ Make sure you follow the [Prerequisites](README.md#Prerequisites) before the exa * [Volume Resizing](../examples/kubernetes/resizing) ## Migrating from in-tree EBS plugin -Starting from Kubernetes 1.17, CSI migration is supported as beta feature (alpha since 1.14). If you have persistence volumes that are created with in-tree `kubernetes.io/aws-ebs` plugin, you could migrate to use EBS CSI driver. To turn on the migration, set `CSIMigration` and `CSIMigrationAWS` feature gates to `true` for `kube-controller-manager` and `kubelet`. +Starting from Kubernetes 1.17, CSI migration is supported as beta feature (alpha since 1.14). If you have persistence volumes that are created with in-tree `kubernetes.io/aws-ebs` plugin, you could migrate to use EBS CSI driver. To turn on the migration, drain the node and set `CSIMigration` and `CSIMigrationAWS` feature gates to `true` for `kube-controller-manager` and `kubelet`. To make sure dynamically provisioned EBS volumes have all tags that the in-tree volume plugin used: * Run the external-provisioner sidecar with `--extra-create-metadata=true` cmdline option. External-provisioner v1.6 or newer is required. * Run the CSI driver with `--k8s-tag-cluster-id=<ID of the Kubernetes cluster>` command line option. +**Warning**: +* kubelet *must* be drained of all pods with mounted EBS volumes ***before*** changing its CSI migration feature flags. Failure to do this will cause deleted pods to get stuck in `Terminating`, requiring a forced delete which can cause filesystem corruption. See [#679](../../../issues/679) for more details. ## Development Please go through [CSI Spec](https://github.com/container-storage-interface/spec/blob/master/spec.md) and [General CSI driver development guideline](https://kubernetes-csi.github.io/docs/developing.html) to get some basic understanding of CSI driver before you start.