mirror of
https://github.com/rancher/rancher-docs.git
synced 2026-09-25 04:28:15 +00:00
adding docs on how to provision nfs storage
This commit is contained in:
+1
-23
@@ -2,30 +2,8 @@
|
||||
title: Users, Global Permissions, and Roles
|
||||
weight: 15
|
||||
---
|
||||
In This Document:
|
||||
|
||||
<!-- TOC -->
|
||||
|
||||
- [Users and Roles](#users-and-roles)
|
||||
- [Global Permissions](#global-permissions)
|
||||
- [Global Permission Assignment](#global-permission-assignment)
|
||||
- [Custom Global Permissions](#custom-global-permissions)
|
||||
- [Global Permissions Reference](#global-permissions-reference)
|
||||
- [Cluster and Project Roles](#cluster-and-project-roles)
|
||||
- [Membership and Role Assignment](#membership-and-role-assignment)
|
||||
- [Cluster Roles](#cluster-roles)
|
||||
- [Custom Cluster Roles](#custom-cluster-roles)
|
||||
- [Cluster Role Reference](#cluster-role-reference)
|
||||
- [Project Roles](#project-roles)
|
||||
- [Custom Project Roles](#custom-project-roles)
|
||||
- [Project Role Reference](#project-role-reference)
|
||||
- [Defining Custom Roles](#defining-custom-roles)
|
||||
- [Locked Roles](#locked-roles)
|
||||
|
||||
<!-- /TOC -->
|
||||
|
||||
|
||||
Within Rancher, each user authenticates as a _user_, which is a login that grants you access to Rancher. As mentioned in [Authenitcation]({{< baseurl >}}/rancher/v2.x/en/concepts/global-configuration/authentication), users can either be local or external.
|
||||
Within Rancher, each user authenticates as a _user_, which is a login that grants you access to Rancher. As mentioned in [Authentication]({{< baseurl >}}/rancher/v2.x/en/concepts/global-configuration/authentication), users can either be local or external.
|
||||
|
||||
After you configure external authentication, the users that display on the **Users** page changes.
|
||||
|
||||
|
||||
@@ -14,7 +14,7 @@ Rancher allows you to create PVs at cluster level and bind them to PVCs later. V
|
||||
|
||||
## Storage Classes
|
||||
|
||||
Storage classes allow you to create PVCs dynamically without having to create PVs first. For example, an Amazon EBS Storage class will dynamically create EBS volumes and bind them to PVCs. A storage class is similar to the notion of a _storage driver_. The following figure illustrates how a PVC creation triggers the dynamic provisioning of an underlying EBS volume.
|
||||
Storage Classes allow you to create PVCs dynamically without having to create PVs first. For example, an Amazon EBS Storage Class will dynamically create EBS volumes and bind them to PVCs. A Storage Class is similar to the notion of a _storage driver_. The following figure illustrates how a PVC creation triggers the dynamic provisioning of an underlying EBS volume.
|
||||
|
||||

|
||||
|
||||
|
||||
@@ -4,17 +4,10 @@ weight: 3500
|
||||
draft: true
|
||||
---
|
||||
|
||||
In This Document:
|
||||
|
||||
<!-- TOC -->
|
||||
|
||||
- [Adding a Persistent Volume](#adding-a-persistent-volume)
|
||||
- [Adding Storage Classes](#adding-storage-classes)
|
||||
- [What's Next?](#whats-next)
|
||||
|
||||
<!-- /TOC -->
|
||||
|
||||
>**Prerequisite:** Completion of all tasks on this page require the `Manage Volumes` [role](../../../concepts/global-configuration/users-permissions-roles/#project-role-reference).
|
||||
>**Prerequisites:**
|
||||
>
|
||||
>- Working with storage requires the `Manage Volumes` [role](../../../concepts/global-configuration/users-permissions-roles/#project-role-reference).
|
||||
>- You must have a storage medium provisioned. For more information, see [Provisioning Storage](provisioning-storage).
|
||||
|
||||
## Adding a Persistent Volume
|
||||
|
||||
@@ -37,7 +30,10 @@ Persistent volumes can either be a disk or file system that you host on premise,
|
||||
|
||||
1. Select the **Volume Plugin** for the disk type or service that you're using.
|
||||
|
||||
>**Note:** You can only use the `Amazon EBS Disk` volume plugin in an Amazon EKS or Amazon EC2 cluster.
|
||||
>**Note:** If the cluster you are adding storage for is a cloud service that also offers cloud storage, you must enable the `cloud provider` option for the cluster, and you must use the service's plug-in to use cloud storage. For example, if you have a Amazon EC2 cluster and you want to use cloud storage for it:
|
||||
|
||||
1. You must enable the `cloud provider` option for the EC2 cluster.
|
||||
2. You must use the `Amazon EBS Disk` volume plugin.
|
||||
|
||||
1. Enter the **Capacity** of your volume in gigabytes.
|
||||
|
||||
@@ -55,7 +51,7 @@ Persistent volumes can either be a disk or file system that you host on premise,
|
||||
|
||||
- **Assign to Storage Class:**
|
||||
|
||||
If you later want to automatically provision persistent volumes identical to the volume that you've specified here, assign it a storage class. Later, when you create a workload that includes persistent volume claims, Rancher automatically provisions a persistent volume for each container with a claim.
|
||||
If you later want to automatically provision persistent volumes identical to the volume that you've specified here, assign it a storage class. Later, when you create a workload, you can assign it a persistent volume claim that references the storage class, which will provision a persistent volume identical to the volume you've specified here.
|
||||
|
||||
>**Note:** You must [add a storage class](#adding-storage-classes) before you can assign it to a persistent volume.
|
||||
|
||||
@@ -63,8 +59,6 @@ Persistent volumes can either be a disk or file system that you host on premise,
|
||||
|
||||
**Result:** Your new persistent volume is created.
|
||||
|
||||
For example, this volume is a _hostPath_ volume in Kubernetes:
|
||||
|
||||
## Adding Storage Classes
|
||||
|
||||
_Storage Classes_ allow you to dynamically provision persistent volumes on demand. Think of storage classes as storage profiles that are created automatically upon a request (which is known as a _persistent volume claim_).
|
||||
@@ -77,6 +71,12 @@ _Storage Classes_ allow you to dynamically provision persistent volumes on deman
|
||||
|
||||
1. From the `Provisioner` drop-down, select the service that you want to use to dynamically provision storage volumes.
|
||||
|
||||
>**Note:** If the cluster you are adding a storage class for is a cloud service that also offers cloud storage, you must enable the `cloud provider` option for the cluster, and you must use the service's plug-in to use cloud storage. For example, if you have a Amazon EC2 cluster and you want to use cloud storage for it:
|
||||
|
||||
1. You must enable the `cloud provider` option for the EC2 cluster.
|
||||
2. You must use the `Amazon EBS Disk` provisioner.
|
||||
|
||||
|
||||
1. From the `Parameters` section, fill out the information required for the service to dynamically provision storage volumes. Each provisioner requires different information to dynamically provision storage volumes. Consult the service's documentation for help on how to obtain this information.
|
||||
|
||||
1. Click `Save`.
|
||||
|
||||
@@ -0,0 +1,11 @@
|
||||
---
|
||||
title: Provisioning Storage
|
||||
weight: 3500
|
||||
draft: true
|
||||
---
|
||||
|
||||
Rancher supports persistent storage with a variety of volume plugins. However, before you use any of these plugins to bind persistent storage to your workloads, you have to configure the storage itself, whether its a cloud-based solution from a service-provider or an on-prem solution that you manage yourself.
|
||||
|
||||
For your convenience, Rancher offers documentation on how to configure some of the popular storage methods:
|
||||
|
||||
- [NFS Share](nfs)
|
||||
+9
-5
@@ -28,18 +28,18 @@ Before you can use the NFS storage volume plug-in with Rancher deployments, you
|
||||
mkdir -p /nfs && chown nobody:nogroup /nfs
|
||||
```
|
||||
- The `-p /nfs` parameter creates a directory named `nfs` at root.
|
||||
- The `chown nobody:nogroup /nfs` parameter allows allcess to the storage directory.
|
||||
- The `chown nobody:nogroup /nfs` parameter allows all access to the storage directory.
|
||||
|
||||
1. Create an NFS exports table. This table sets the directory paths on your NFS server that are exposed to the nodes that will use the server for storage.
|
||||
|
||||
1. Open `/etc/exports`.
|
||||
1. Add the path of the `/nfs` folder that you created in step 3, along with the IP addresses of your cluster nodes. An an entry for each IP address in your cluster. Follow each address and its accompanying parameters with a single space that is a delimiter.
|
||||
1. Open `/etc/exports` using your text editor of choice.
|
||||
1. Add the path of the `/nfs` folder that you created in step 3, along with the IP addresses of your cluster nodes. Add an entry for each IP address in your cluster. Follow each address and its accompanying parameters with a single space that is a delimiter.
|
||||
|
||||
```
|
||||
/nfs <IP_ADDRESS1>(rw,sync,no_subtree_check) <IP_ADDRESS2>(rw,sync,no_subtree_check) <IP_ADDRESS3>(rw,sync,no_subtree_check)
|
||||
```
|
||||
|
||||
**Tip:** You can replace the IP Addresses with a subnet. For example: `10.212.50.12/24`
|
||||
**Tip:** You can replace the IP addresses with a subnet. For example: `10.212.50.12/24`
|
||||
|
||||
1. Update the NFS table by entering the following command:
|
||||
|
||||
@@ -54,7 +54,11 @@ Before you can use the NFS storage volume plug-in with Rancher deployments, you
|
||||
```
|
||||
rpcinfo -p | grep nfs
|
||||
```
|
||||
2. Open the ports that the previous command outputs.
|
||||
2. [Open the ports](https://help.ubuntu.com/lts/serverguide/firewall.html.en) that the previous command outputs. For example, the following command opens port 2049:
|
||||
|
||||
```
|
||||
sudo ufw allow 2049
|
||||
```
|
||||
|
||||
**Result:** Your NFS server is configured to be used for storage with your Rancher nodes.
|
||||
|
||||
|
||||
@@ -38,7 +38,8 @@ Deploy a workload to run an application in one or more containers.
|
||||
> To mount an Amazon EBS volume:
|
||||
>
|
||||
>- In [Amazon AWS](https://aws.amazon.com/), the nodes must be in the same Availability Zone and possess IAM permissions to attach/unattach volumes.
|
||||
>- The cluster must be using AWS cloud provider.
|
||||
>
|
||||
>- The cluster must be using the [AWS cloud provider](https://kubernetes.io/docs/concepts/cluster-administration/cloud-providers/#aws) option. For more information on enabling this option see [Creating an Amazon EC2 Cluster](../../clusters/creating-a-cluster/create-cluster-amazon-ec2/) or [Creating a Custom Cluster](../../clusters/creating-a-cluster/create-cluster-custom/).
|
||||
|
||||
|
||||
1. Click **Show Advanced Options** and configure:
|
||||
|
||||
Reference in New Issue
Block a user