text stringlengths 0 59.1k |
|---|
{ |
"kind": "Service", |
"apiVersion": "v1", |
"metadata": { |
"name": "zookeeper", |
"labels": { |
"name": "zookeeper" |
} |
}, |
"spec": { |
"ports": [ |
{ |
"port": 2181 |
} |
], |
"selector": { |
"name": "zookeeper" |
} |
} |
} |
<|endoftext|> |
# source: k8s_examples/_archived/volumes/glusterfs/glusterfs-endpoints.yaml type: yaml |
apiVersion: v1 |
kind: Endpoints |
metadata: |
name: glusterfs-cluster |
subsets: |
- addresses: |
- ip: 10.240.106.152 |
ports: |
- port: 1 |
- addresses: |
- ip: 10.240.79.157 |
ports: |
- port: 1 |
<|endoftext|> |
# source: k8s_examples/_archived/volumes/glusterfs/README.md type: docs |
## GlusterFS |
NOTE: GlusterFS in-tree storage driver ( `kubernetes.io/glusterfs`) which was |
deprecated in kubernetes 1.25 release is removed entirely in `v1.26`. Volumes |
must be migrated to an alternate storage solution before upgrading to `v1.26`. |
[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 |
have a working GlusterFS volume ready to use in the containers. |
#### Prerequisites |
* Set up a GlusterFS server cluster |
* Create a GlusterFS volume |
* If you are not using hyperkube, you may need to install the GlusterFS client |
package on the Kubernetes nodes |
([Guide](https://docs.gluster.org/en/latest/Administrator-Guide/Setting-Up-Clients/)) |
#### Create endpoints |
The first step is to create the GlusterFS endpoints definition in Kubernetes. |
Here is a snippet of [glusterfs-endpoints.yaml](glusterfs-endpoints.yaml): |
```yaml |
subsets: |
- addresses: |
- ip: 10.240.106.152 |
ports: |
- port: 1 |
- addresses: |
- ip: 10.240.79.157 |
ports: |
- port: 1 |
``` |
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. |
Create the endpoints: |
```sh |
$ kubectl create -f examples/volumes/glusterfs/glusterfs-endpoints.yaml |
``` |
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 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.yaml](glusterfs-service.yaml) for details. |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.