mirror of
https://github.com/rancher/rancher-docs.git
synced 2026-05-15 01:23:21 +00:00
@@ -5,7 +5,7 @@ aliases:
|
||||
- /rancher/v2.x/en/concepts/volumes-and-storage/
|
||||
- /rancher/v2.x/en/tasks/clusters/adding-storage/
|
||||
---
|
||||
When deploying an application that needs to retain data, you'll need to create persistent storage. Persistent storage allows you to store application data external from the pod running your application. This storage practice allows you to maintain application data, even if the application's pod fails.
|
||||
When deploying an application that needs to retain data, you'll need to create persistent storage. Persistent storage allows you to store application data external from the pod running your application. This storage practice allows you to maintain application data, even if the application's pod fails.
|
||||
|
||||
There are two ways to create persistent storage in Kubernetes: Persistent Volumes (PVs) and Storage Classes.
|
||||
|
||||
@@ -163,6 +163,37 @@ _Storage Classes_ allow you to dynamically provision persistent volumes on deman
|
||||
|
||||
1. Click `Save`.
|
||||
|
||||
## iSCSI Volumes With Rancher Launched Kubernetes Clusters
|
||||
|
||||
In [Rancher Launched Kubernetes clusters]({{< baseurl >}}/rancher/v2.x/en/cluster-provisioning/rke-clusters/) that store data on iSCSI volumes, you may experience an issue where kubelets fail to automatically connect with iSCSI volumes. This failure is likely due to an incompatibility issue involving the iSCSI initiator tool. You can resolve this issue by installing the iSCSI initiator tool on each of your cluster nodes.
|
||||
|
||||
Rancher Launched Kubernetes clusters storing data on iSCSI volumes leverage the [iSCSI initiator tool](http://www.open-iscsi.com/), which is embedded in the kubelet's `rancher/hyperkube` Docker image. From each kubelet (i.e., the _initiator_), the tool discovers and launches sessions with an iSCSI volume (i.e., the _target_). However, in some instances, the versions of the iSCSI initiator tool installed on the initiator and the target may not match, resulting in a connection failure.
|
||||
|
||||
|
||||
If you encounter this issue, you can work around it by installing the initiator tool on each node in your cluster. You can install the iSCSI initiator tool by logging into your cluster nodes and entering one of the following commands:
|
||||
|
||||
| Platform | Package Name | Install Command |
|
||||
| ------------- | ----------------------- | -------------------------------------- |
|
||||
| Ubuntu/Debian | `open-iscsi` | `sudo apt install open-iscsi` |
|
||||
| RHEL | `iscsi-initiator-utils` | `yum install iscsi-initiator-utils -y` |
|
||||
|
||||
|
||||
<br/>
|
||||
After installing the initiator tool on your nodes, edit the YAML for your cluster, editing the kubelet configuration to mount the iSCSI binary and configuration, as shown in the sample below.
|
||||
|
||||
>**Note:**
|
||||
>
|
||||
>Before updating your Kubernetes YAML to mount the iSCSI binary and configuration, make sure either the `open-iscsi` (deb) or `iscsi-initiator-utils` (yum) package is installed on your cluster nodes. If this package isn't installed _before_ the bind mounts are created in your Kubernetes YAML, Docker will automatically create the directories and files on each node and will not allow the package install to succeed.
|
||||
|
||||
```
|
||||
services:
|
||||
kubelet:
|
||||
extra_binds:
|
||||
- "/etc/iscsi:/etc/iscsi"
|
||||
- "/sbin/iscsiadm:/sbin/iscsiadm"
|
||||
```
|
||||
|
||||
|
||||
## What's Next?
|
||||
|
||||
Mount Persistent Volumes to workloads so that your applications can store their data. You can mount a either a manually created Persistent Volumes or a dynamically created Persistent Volume, which is created from a a Storage Class.
|
||||
|
||||
Reference in New Issue
Block a user