<pre><code>Warning FailedMount 23m (x55 over 3h) kubelet, ip-172-31-3-191.us-east-2.compute.internal Unable to attach or mount volumes: unmounted volumes=[mysql-persistent-storage], unattached volumes=[mysql-persistent-storage default-token-6vkr2]: timed out waiting for the condition
Warning FailedMount 4m (x105 over 3h7m) kubelet, ip-172-31-3-191.us-east-2.compute.internal (combined from similar events): MountVolume.SetUp failed for volume &quot;pv&quot; : mount failed: exit status 32
Mounting command: systemd-run
Mounting arguments: --description=Kubernetes transient mount for /var/lib/kubelet/pods/408ffa6b-1f64-4f1a-adfd-01b77ad7b886/volumes/kubernetes.ioaws-ebs/pv --scope -- mount -o bind /var/lib/kubelet/plugins/kubernetes.io/aws-ebs/mounts/aws/us-east-2a/vol-011d7bb42da888b82 /var/lib/kubelet/pods/408ffa6b-1f64-4f1a-adfd-01b77ad7b886/volumes/kubernetes.ioaws-ebs/pv
Output: Running scope as unit run-9240.scope.
mount: /var/lib/kubelet/pods/408ffa6b-1f64-4f1a-adfd-01b77ad7b886/volumes/kubernetes.io~aws-ebs/pv: special device /var/lib/kubelet/plugins/kubernetes.io/aws-ebs/mounts/aws/us-east-2a/vol-011d7bb42da888b82 does not exist.
Warning FailedAttachVolume 2m38s (x92 over 3h7m) attachdetach-controller AttachVolume.NewAttacher failed for volume &quot;pv&quot; : Failed to get AWS Cloud Provider. GetCloudProvider returned instead
</code></pre>
<p>I am running <code>kubernetes</code> cluster on <code>AWS EC2</code> machines.</p>
<p>When I am trying to attach <code>EBS</code> volume I am getting the above error.</p>

Suresh
<p>There are at least three possible solutions:</p>
<ul>
<li>check your <code>k8s</code> version; maybe you'll want to update it;</li>
<li>install <code>NFS</code> on your infrastructure;</li>
<li>fix <code>inbound</code> CIDR rule</li>
</ul>
<h1><code>k8s</code> version</h1>
<p>There is a known issue:
<a href="https://github.com/kubernetes/kubernetes/issues/77916" rel="nofollow noreferrer">MountVolume.SetUp failed for volume pvc mount failed: exit status 32 · Issue #77916 · kubernetes/kubernetes</a></p>
<p>And it's fixed in <a href="https://github.com/kubernetes/kubernetes/issues/77663#issuecomment-493453846" rel="nofollow noreferrer">#77663</a></p>
<p>So, check your <code>k8s</code> version</p>
<pre><code>kubectl version
kubeadm version
</code></pre>
<h1>Install NFS on your infrastructure</h1>
<p>There are three answers where installing <code>NFS</code> helped in cases like yours:</p>
<p><a href="https://stackoverflow.com/a/49571145/5720818">A: 49571145</a>
<a href="https://stackoverflow.com/a/52457325/5720818">A: 52457325</a>
<a href="https://stackoverflow.com/a/55922445/5720818">A: 55922445</a></p>
<h1>Fix inbound CIDR rule</h1>
<p>One of solutions is to add cluster's CIDR to</p>
<p>See <a href="https://stackoverflow.com/a/61868673/5720818">A: 61868673</a></p>
<blockquote>
<p>I was facing this issue because of the Kubernetes cluster node CIDR range was not present in the inbound rule of Security Group of my AWS EC2 instance(where my NFS server was running )</p>
</blockquote>
<blockquote>
<p>Solution: Added my Kubernetes cluser Node CIDR range to inbound rule of Security Group.</p>
</blockquote>
