Skip to content

Commit 280ca62

Browse files
author
Kubernetes Submit Queue
authored
Merge pull request #43703 from metachris/glusterfsReadmeUpdate
Automatic merge from submit-queue Fixed typos and issues in examples/volumes/glusterfs/README.md **What this PR does / why we need it**: This PR updates the GlusterFS `README.md` to fix several typos, outdated documentation and examples that did not work anymore. **Which issue this PR fixes** None **Special notes for your reviewer**: None **Release note**: `release-note-NONE`
2 parents 8c807fa + 0e65387 commit 280ca62

File tree

2 files changed

+36
-37
lines changed

2 files changed

+36
-37
lines changed

volumes/glusterfs/README.md

Lines changed: 35 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -1,34 +1,35 @@
1-
## Glusterfs
1+
## GlusterFS
22

3-
[Glusterfs](http://www.gluster.org) is an open source scale-out filesystem. These examples provide information about how to allow containers use Glusterfs volumes.
3+
[GlusterFS](http://www.gluster.org) is an open source scale-out filesystem. These examples provide information about how to allow containers use GlusterFS volumes.
44

5-
The example assumes that you have already set up a Glusterfs server cluster and the Glusterfs client package is installed on all Kubernetes nodes.
5+
The example assumes that you have already set up a GlusterFS server cluster and have a working GlusterFS volume ready to use in the containers.
66

77
### Prerequisites
88

9-
Set up Glusterfs server cluster; install Glusterfs client package on the Kubernetes nodes. ([Guide](http://gluster.readthedocs.io/en/latest/Administrator%20Guide/))
9+
* Set up a GlusterFS server cluster
10+
* Create a GlusterFS volume
11+
* If you are not using hyperkube, you may need to install the GlusterFS client package on the Kubernetes nodes ([Guide](http://gluster.readthedocs.io/en/latest/Administrator%20Guide/))
1012

1113
### Create endpoints
1214

13-
Here is a snippet of [glusterfs-endpoints.json](glusterfs-endpoints.json),
15+
The first step is to create the GlusterFS endpoints definition in Kubernetes. Here is a snippet of [glusterfs-endpoints.json](glusterfs-endpoints.json):
1416

1517
```
16-
"addresses": [
17-
{
18-
"IP": "10.240.106.152"
19-
}
20-
],
21-
"ports": [
22-
{
23-
"port": 1
24-
}
25-
]
26-
18+
"subsets": [
19+
{
20+
"addresses": [{ "ip": "10.240.106.152" }],
21+
"ports": [{ "port": 1 }]
22+
},
23+
{
24+
"addresses": [{ "ip": "10.240.79.157" }],
25+
"ports": [{ "port": 1 }]
26+
}
27+
]
2728
```
2829

29-
The "IP" field should be filled with the address of a node in the Glusterfs server cluster. In this example, it is fine to give any valid value (from 1 to 65535) to the "port" field.
30+
The `subsets` field should be populated with the addresses of the nodes in the GlusterFS cluster. It is fine to provide any valid value (from 1 to 65535) in the `port` field.
3031

31-
Create the endpoints,
32+
Create the endpoints:
3233

3334
```sh
3435
$ kubectl create -f examples/volumes/glusterfs/glusterfs-endpoints.json
@@ -42,7 +43,7 @@ NAME ENDPOINTS
4243
glusterfs-cluster 10.240.106.152:1,10.240.79.157:1
4344
```
4445

45-
We need also create a service for this endpoints, so that the endpoints will be persistented. We will add this service without a selector to tell Kubernetes we want to add its endpoints manually. You can see [glusterfs-service.json](glusterfs-service.json) for details.
46+
We also need to create a service for these endpoints, so that they will persist. We will add this service without a selector to tell Kubernetes we want to add its endpoints manually. You can see [glusterfs-service.json](glusterfs-service.json) for details.
4647

4748
Use this command to create the service:
4849

@@ -51,24 +52,26 @@ $ kubectl create -f examples/volumes/glusterfs/glusterfs-service.json
5152
```
5253

5354

54-
### Create a POD
55+
### Create a Pod
5556

56-
The following *volume* spec in [glusterfs-pod.json](glusterfs-pod.json) illustrates a sample configuration.
57+
The following *volume* spec in [glusterfs-pod.json](glusterfs-pod.json) illustrates a sample configuration:
5758

5859
```json
59-
{
60-
"name": "glusterfsvol",
61-
"glusterfs": {
62-
"endpoints": "glusterfs-cluster",
63-
"path": "kube_vol",
64-
"readOnly": true
60+
"volumes": [
61+
{
62+
"name": "glusterfsvol",
63+
"glusterfs": {
64+
"endpoints": "glusterfs-cluster",
65+
"path": "kube_vol",
66+
"readOnly": true
6567
}
66-
}
68+
}
69+
]
6770
```
6871

6972
The parameters are explained as the followings.
7073

71-
- **endpoints** is endpoints name that represents a Gluster cluster configuration. *kubelet* is optimized to avoid mount storm, it will randomly pick one from the endpoints to mount. If this host is unresponsive, the next Gluster host in the endpoints is automatically selected.
74+
- **endpoints** is the name of the Endpoints object that represents a Gluster cluster configuration. *kubelet* is optimized to avoid mount storm, it will randomly pick one from the endpoints to mount. If this host is unresponsive, the next Gluster host in the endpoints is automatically selected.
7275
- **path** is the Glusterfs volume name.
7376
- **readOnly** is the boolean that sets the mountpoint readOnly or readWrite.
7477

@@ -84,17 +87,13 @@ You can verify that the pod is running:
8487
$ kubectl get pods
8588
NAME READY STATUS RESTARTS AGE
8689
glusterfs 1/1 Running 0 3m
87-
88-
$ kubectl get pods glusterfs -t '{{.status.hostIP}}{{"\n"}}'
89-
10.240.169.172
9090
```
9191

92-
You may ssh to the host (the hostIP) and run 'mount' to see if the Glusterfs volume is mounted,
92+
You may execute the command `mount` inside the container to see if the GlusterFS volume is mounted correctly:
9393

9494
```sh
95-
$ mount | grep kube_vol
96-
10.240.106.152:kube_vol on /var/lib/kubelet/pods/f164a571-fa68-11e4-ad5c-42010af019b7/volumes/kubernetes.io~glusterfs/glusterfsvol type fuse.glusterfs (rw,relatime,user_id=0,group_id=0,default_permissions,allow_other,max_read=131072)
97-
```
95+
$ kubectl exec glusterfs -- mount | grep gluster
96+
10.240.106.152:kube_vol on /mnt/glusterfs type fuse.glusterfs (rw,relatime,user_id=0,group_id=0,default_permissions,allow_other,max_read=131072)```
9897
9998
You may also run `docker ps` on the host to see the actual container.
10099

volumes/glusterfs/glusterfs-pod.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
"containers": [
99
{
1010
"name": "glusterfs",
11-
"image": "kubernetes/pause",
11+
"image": "nginx",
1212
"volumeMounts": [
1313
{
1414
"mountPath": "/mnt/glusterfs",

0 commit comments

Comments
 (0)