Switch to github.com/golang/dep for vendoring
Signed-off-by: Mrunal Patel <mrunalp@gmail.com>
This commit is contained in:
parent
d6ab91be27
commit
8e5b17cf13
15431 changed files with 3971413 additions and 8881 deletions
104
vendor/k8s.io/kubernetes/examples/volumes/glusterfs/README.md
generated
vendored
Normal file
104
vendor/k8s.io/kubernetes/examples/volumes/glusterfs/README.md
generated
vendored
Normal file
|
@ -0,0 +1,104 @@
|
|||
## Glusterfs
|
||||
|
||||
[Glusterfs](http://www.gluster.org) is an open source scale-out filesystem. These examples provide information about how to allow containers use Glusterfs volumes.
|
||||
|
||||
The example assumes that you have already set up a Glusterfs server cluster and the Glusterfs client package is installed on all Kubernetes nodes.
|
||||
|
||||
### Prerequisites
|
||||
|
||||
Set up Glusterfs server cluster; install Glusterfs client package on the Kubernetes nodes. ([Guide](http://gluster.readthedocs.io/en/latest/Administrator%20Guide/))
|
||||
|
||||
### Create endpoints
|
||||
|
||||
Here is a snippet of [glusterfs-endpoints.json](glusterfs-endpoints.json),
|
||||
|
||||
```
|
||||
"addresses": [
|
||||
{
|
||||
"IP": "10.240.106.152"
|
||||
}
|
||||
],
|
||||
"ports": [
|
||||
{
|
||||
"port": 1
|
||||
}
|
||||
]
|
||||
|
||||
```
|
||||
|
||||
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.
|
||||
|
||||
Create the endpoints,
|
||||
|
||||
```sh
|
||||
$ kubectl create -f examples/volumes/glusterfs/glusterfs-endpoints.json
|
||||
```
|
||||
|
||||
You can verify that the endpoints are successfully created by running
|
||||
|
||||
```sh
|
||||
$ kubectl get endpoints
|
||||
NAME ENDPOINTS
|
||||
glusterfs-cluster 10.240.106.152:1,10.240.79.157:1
|
||||
```
|
||||
|
||||
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.
|
||||
|
||||
Use this command to create the service:
|
||||
|
||||
```sh
|
||||
$ kubectl create -f examples/volumes/glusterfs/glusterfs-service.json
|
||||
```
|
||||
|
||||
|
||||
### Create a POD
|
||||
|
||||
The following *volume* spec in [glusterfs-pod.json](glusterfs-pod.json) illustrates a sample configuration.
|
||||
|
||||
```json
|
||||
{
|
||||
"name": "glusterfsvol",
|
||||
"glusterfs": {
|
||||
"endpoints": "glusterfs-cluster",
|
||||
"path": "kube_vol",
|
||||
"readOnly": true
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
The parameters are explained as the followings.
|
||||
|
||||
- **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.
|
||||
- **path** is the Glusterfs volume name.
|
||||
- **readOnly** is the boolean that sets the mountpoint readOnly or readWrite.
|
||||
|
||||
Create a pod that has a container using Glusterfs volume,
|
||||
|
||||
```sh
|
||||
$ kubectl create -f examples/volumes/glusterfs/glusterfs-pod.json
|
||||
```
|
||||
|
||||
You can verify that the pod is running:
|
||||
|
||||
```sh
|
||||
$ kubectl get pods
|
||||
NAME READY STATUS RESTARTS AGE
|
||||
glusterfs 1/1 Running 0 3m
|
||||
|
||||
$ kubectl get pods glusterfs -t '{{.status.hostIP}}{{"\n"}}'
|
||||
10.240.169.172
|
||||
```
|
||||
|
||||
You may ssh to the host (the hostIP) and run 'mount' to see if the Glusterfs volume is mounted,
|
||||
|
||||
```sh
|
||||
$ mount | grep kube_vol
|
||||
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)
|
||||
```
|
||||
|
||||
You may also run `docker ps` on the host to see the actual container.
|
||||
|
||||
|
||||
<!-- BEGIN MUNGE: GENERATED_ANALYTICS -->
|
||||
[]()
|
||||
<!-- END MUNGE: GENERATED_ANALYTICS -->
|
33
vendor/k8s.io/kubernetes/examples/volumes/glusterfs/glusterfs-endpoints.json
generated
vendored
Normal file
33
vendor/k8s.io/kubernetes/examples/volumes/glusterfs/glusterfs-endpoints.json
generated
vendored
Normal file
|
@ -0,0 +1,33 @@
|
|||
{
|
||||
"kind": "Endpoints",
|
||||
"apiVersion": "v1",
|
||||
"metadata": {
|
||||
"name": "glusterfs-cluster"
|
||||
},
|
||||
"subsets": [
|
||||
{
|
||||
"addresses": [
|
||||
{
|
||||
"ip": "10.240.106.152"
|
||||
}
|
||||
],
|
||||
"ports": [
|
||||
{
|
||||
"port": 1
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"addresses": [
|
||||
{
|
||||
"ip": "10.240.79.157"
|
||||
}
|
||||
],
|
||||
"ports": [
|
||||
{
|
||||
"port": 1
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
31
vendor/k8s.io/kubernetes/examples/volumes/glusterfs/glusterfs-pod.json
generated
vendored
Normal file
31
vendor/k8s.io/kubernetes/examples/volumes/glusterfs/glusterfs-pod.json
generated
vendored
Normal file
|
@ -0,0 +1,31 @@
|
|||
{
|
||||
"apiVersion": "v1",
|
||||
"kind": "Pod",
|
||||
"metadata": {
|
||||
"name": "glusterfs"
|
||||
},
|
||||
"spec": {
|
||||
"containers": [
|
||||
{
|
||||
"name": "glusterfs",
|
||||
"image": "kubernetes/pause",
|
||||
"volumeMounts": [
|
||||
{
|
||||
"mountPath": "/mnt/glusterfs",
|
||||
"name": "glusterfsvol"
|
||||
}
|
||||
]
|
||||
}
|
||||
],
|
||||
"volumes": [
|
||||
{
|
||||
"name": "glusterfsvol",
|
||||
"glusterfs": {
|
||||
"endpoints": "glusterfs-cluster",
|
||||
"path": "kube_vol",
|
||||
"readOnly": true
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
12
vendor/k8s.io/kubernetes/examples/volumes/glusterfs/glusterfs-service.json
generated
vendored
Normal file
12
vendor/k8s.io/kubernetes/examples/volumes/glusterfs/glusterfs-service.json
generated
vendored
Normal file
|
@ -0,0 +1,12 @@
|
|||
{
|
||||
"kind": "Service",
|
||||
"apiVersion": "v1",
|
||||
"metadata": {
|
||||
"name": "glusterfs-cluster"
|
||||
},
|
||||
"spec": {
|
||||
"ports": [
|
||||
{"port": 1}
|
||||
]
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue