How to attach OpenStack volume to a Kubernetes staic pod? How to attach OpenStack volume to a Kubernetes staic pod? kubernetes kubernetes

How to attach OpenStack volume to a Kubernetes staic pod?


Message Volume has not been added to the list of VolumesInUse in the node's volume status for volume. says that attach/detach operations for that node are delegated to controller-manager only. Kubelet waits for attachment being made by controller but volume doesn't reach appropriate state because controller isn't up yet.The solution is to set kubelet flag --enable-controller-attach-detach=false to let kubelet attach, mount and so on. This flag is set to true by default because of the following reasons

  • If a node is lost, volumes that were attached to it can be detachedby the controller and reattached elsewhere.

  • Credentials for attaching and detaching do not need to be madepresent on every node, improving security.

In your case setting of this flag to false is reasonable as this is the only way to achieve what you want.