<p>I have tried connecting unencrypted EFS and it is working fine, but with encrypted EFS, the pod is throwing below error:</p>
<pre class="lang-sh prettyprint-override"><code>  Normal   Scheduled    10m                    default-scheduler                                     Successfully assigned default/jenkins-efs-test-8ffb4dc86-xnjdj to ip-10-100-4-249.ap-south-1.compute.internal
  Warning  FailedMount  6m33s (x2 over 8m49s)  kubelet, ip-10-100-4-249.ap-south-1.compute.internal  Unable to attach or mount volumes: unmounted volumes=[jenkins-home], unattached volumes=[sc-config-volume tmp jenkins-home jenkins-config secrets-dir plugins plugin-dir jenkins-efs-test-token-7nmkz]: timed out waiting for the condition
  Warning  FailedMount  4m19s                  kubelet, ip-10-100-4-249.ap-south-1.compute.internal  Unable to attach or mount volumes: unmounted volumes=[jenkins-home], unattached volumes=[plugins plugin-dir jenkins-efs-test-token-7nmkz sc-config-volume tmp jenkins-home jenkins-config secrets-dir]: timed out waiting for the condition
  Warning  FailedMount  2m2s                   kubelet, ip-10-100-4-249.ap-south-1.compute.internal  Unable to attach or mount volumes: unmounted volumes=[jenkins-home], unattached volumes=[tmp jenkins-home jenkins-config secrets-dir plugins plugin-dir jenkins-efs-test-token-7nmkz sc-config-volume]: timed out waiting for the condition
  Warning  FailedMount  35s (x13 over 10m)     kubelet, ip-10-100-4-249.ap-south-1.compute.internal  MountVolume.SetUp failed for volume &quot;efs-pv&quot; : kubernetes.io/csi: mounter.SetupAt failed: rpc error: code = Internal desc = Could not mount &quot;&quot; at &quot;/var/lib/kubelet/pods/354800a1-dcf5-4812-aa91-0e84ca6fba59/volumes/kubernetes.io~csi/efs-pv/mount&quot;: mount failed: exit status 1
Mounting command: mount
Mounting arguments: -t efs /var/lib/kubelet/pods/354800a1-dcf5-4812-aa91-0e84ca6fba59/volumes/kubernetes.io~csi/efs-pv/mount
Output: mount: /var/lib/kubelet/pods/354800a1-dcf5-4812-aa91-0e84ca6fba59/volumes/kubernetes.io~csi/efs-pv/mount: can't find in /etc/fstab.
</code></pre>
<p>What am I missing here?</p>

Sreejith
<p>You didn't specify what the K8s manifests are or any configuration. <a href="https://docs.aws.amazon.com/efs/latest/ug/mounting-fs.html#mounting-access-points" rel="nofollow noreferrer">There shouldn't be any difference between encrypted and non-encrypted volumes when it comes to mounting from the client-side</a>. In essence, AWS manages the encryption keys for you using <a href="https://docs.aws.amazon.com/efs/latest/ug/encryption-at-rest.html" rel="nofollow noreferrer">KMS</a>.</p>
<p>The error you are seeing is basically because <a href="https://askubuntu.com/questions/771473/mount-cant-find-device-in-etc-fstab">the mount command is not specifying the mount point</a> so there must have been some other default configuration from the K8s side that you are changing when using un-encrypted EFS volumes. Also, is the <a href="https://docs.aws.amazon.com/efs/latest/ug/installing-amazon-efs-utils.html" rel="nofollow noreferrer">EFS Mount helper</a> available on the Kubernetes node where you are trying to mount the EFS Volume?</p>
<p>✌️</p>
