From ce40c4d7c21a0713a819953bc5b610c43704d95b Mon Sep 17 00:00:00 2001 From: Sami Wagiaalla Date: Fri, 19 Jun 2015 11:49:41 -0400 Subject: [PATCH] Minor fixups to iSCSI example. - Put the link for setting up the target before initiator link. - Add a comment about removing the partition created in the linked tutorial. - Change the settings in the pod to resemble those you would if you follow the tutorial Signed-off-by: Sami Wagiaalla --- examples/iscsi/README.md | 12 +++++++++++- examples/iscsi/iscsi.json | 12 ++++++------ 2 files changed, 17 insertions(+), 7 deletions(-) diff --git a/examples/iscsi/README.md b/examples/iscsi/README.md index 16814b72ce..fda94f35f9 100644 --- a/examples/iscsi/README.md +++ b/examples/iscsi/README.md @@ -8,7 +8,7 @@ If you use Fedora 21 on Kubernetes node, then first install iSCSI initiator on t then edit */etc/iscsi/initiatorname.iscsi* and */etc/iscsi/iscsid.conf* to match your iSCSI target configuration. -I mostly followed these [instructions](http://www.server-world.info/en/note?os=Fedora_21&p=iscsi&f=2) to setup iSCSI initiator and these [instructions](http://www.server-world.info/en/note?os=Fedora_21&p=iscsi) to setup iSCSI target. +I mostly followed these [instructions](http://www.server-world.info/en/note?os=Fedora_21&p=iscsi) to setup iSCSI target. and these [instructions](http://www.server-world.info/en/note?os=Fedora_21&p=iscsi&f=2) to setup iSCSI initiator. **Setup B.** On Unbuntu 12.04 and Debian 7 nodes on GCE @@ -17,6 +17,16 @@ GCE does not provide preconfigured Fedora 21 image, so I set up the iSCSI target ##Step 2. Creating the pod with iSCSI persistent storage Once you have installed iSCSI initiator and new Kubernetes, you can create a pod based on my example *iscsi.json*. In the pod JSON, you need to provide *targetPortal* (the iSCSI target's **IP** address and *port* if not the default port 3260), target's *iqn*, *lun*, and the type of the filesystem that has been created on the lun, and *readOnly* boolean. +**Note:** If you have followed the instructions in the links above you +may have partitioned the device, the iSCSI volume plugin does not +currently support partitions so format the device as one partition. +Make sure you have the correct device name then run the following as +root to format it: + +```console +mkfs.ext4 /dev/ +``` + Once your pod is created, run it on the Kubernetes master: ```console diff --git a/examples/iscsi/iscsi.json b/examples/iscsi/iscsi.json index 439832b804..9ee914d32c 100644 --- a/examples/iscsi/iscsi.json +++ b/examples/iscsi/iscsi.json @@ -31,8 +31,8 @@ { "name": "iscsipd-ro", "iscsi": { - "targetPortal": "10.16.154.81:3260", - "iqn": "iqn.2014-12.world.server:storage.target01", + "targetPortal": "127.0.0.1:3260", + "iqn": "iqn.2014-12.world.server:www.server.world", "lun": 0, "fsType": "ext4", "readOnly": true @@ -41,10 +41,10 @@ { "name": "iscsipd-rw", "iscsi": { - "targetPortal": "10.16.154.81:3260", - "iqn": "iqn.2014-12.world.server:storage.target01", - "lun": 1, - "fsType": "xfs", + "targetPortal": "127.0.0.1:3260", + "iqn": "iqn.2014-12.world.server:www.server.world", + "lun": 0, + "fsType": "ext4", "readOnly": false } }