#### iSCSI Under Rancher2

##### Steps required for iSCSI support on a Rancher v2 node
###### May 21, 2018
rancher kubernetes

Not obvious. When I installed v2 yesterday, I did so primarily so that I could have iSCSI support that doesn’t work properly under v1. It didn’t work out of the box, and I kicked it around for a bit before it did. I’m not sure what fixed it, but after a reboot today, it had gone back to not working.

The output was something like this:

MountVolume.WaitForAttach failed for volume "mqtt-data" : failed to get any path for iscsi disk, last err seen:

iscsi: failed to attach disk: Error: iscsiadm: Could not login to [iface: default, target: iqn.2006-04.us.monach:nas.mqtt-data, portal: 10.68.0.11,3260].


• the kubelet container has its own data under /etc/iscsid that differs from the hose, showing that it does not integrate with the host’s iscsid process in any way
From this I deduced that the iscsid service running on the host was in the way. I stopped and disabled the service on the host, and immediately new iscsid processes appeared. The output of docker top showed that these were started by the kubelet container, and the container that was unable to mount the iSCSI volume fired up cleanly.