github.com/qsunny/k8s@v0.0.0-20220101153623-e6dca256d5bf/examples-master/staging/volumes/quobyte/Readme.md (about)

     1  <!-- BEGIN MUNGE: GENERATED_TOC -->
     2  
     3  - [Quobyte Volume](#quobyte-volume)
     4    - [Quobyte](#quobyte)
     5      - [Prerequisites](#prerequisites)
     6      - [Fixed user Mounts](#fixed-user-mounts)
     7    - [Creating a pod](#creating-a-pod)
     8  
     9  <!-- END MUNGE: GENERATED_TOC -->
    10  
    11  # Quobyte Volume
    12  
    13  ## Quobyte
    14  
    15  [Quobyte](http://www.quobyte.com) is software that turns commodity servers into a reliable and highly automated multi-data center file system.
    16  
    17  The example assumes that you already have a running Kubernetes cluster and you already have setup Quobyte-Client (1.3+) on each Kubernetes node.
    18  
    19  ### Prerequisites
    20  
    21  - Running Quobyte storage cluster
    22  - Quobyte client (1.3+) installed on the Kubernetes nodes more information how you can install Quobyte on your Kubernetes nodes, can be found in the [documentation](https://support.quobyte.com) of Quobyte.
    23  - To get access to Quobyte and the documentation please [contact us](http://www.quobyte.com/get-quobyte)
    24  - Already created Quobyte Volume
    25  - Added the line `allow-usermapping-in-volumename` in `/etc/quobyte/client.cfg` to allow the fixed user mounts
    26  
    27  ### Fixed user Mounts
    28  
    29  Quobyte supports since 1.3 fixed user mounts. The fixed-user mounts simply allow to mount all Quobyte Volumes inside one directory and use them as different users. All access to the Quobyte Volume will be rewritten to the specified user and group – both are optional, independent of the user inside the container. You can read more about it [here](https://blog.inovex.de/docker-plugins) under the section "Quobyte Mount and Docker — what’s special"
    30  
    31  ## Creating a pod
    32  
    33  See example:
    34  
    35  <!-- BEGIN MUNGE: EXAMPLE ./quobyte-pod.yaml -->
    36  
    37  ```yaml
    38  apiVersion: v1
    39  kind: Pod
    40  metadata:
    41    name: quobyte
    42  spec:
    43    containers:
    44    - name: quobyte
    45      image: kubernetes/pause
    46      volumeMounts:
    47      - mountPath: /mnt
    48        name: quobytevolume
    49    volumes:
    50    - name: quobytevolume
    51      quobyte:
    52        registry: registry:7861
    53        volume: testVolume
    54        readOnly: false
    55        user: root
    56        group: root
    57  ```
    58  
    59  [Download example](quobyte-pod.yaml?raw=true)
    60  <!-- END MUNGE: EXAMPLE ./quobyte-pod.yaml -->
    61  
    62  Parameters:
    63  * **registry** Quobyte registry to use to mount the volume. You can specify the registry as <host>:<port> pair or if you want to specify multiple registries you just have to put a comma between them e.q. <host1>:<port>,<host2>:<port>,<host3>:<port>. The host can be an IP address or if you have a working DNS you can also provide the DNS names.
    64  * **volume** volume represents a Quobyte volume which must be created before usage.
    65  * **readOnly** is the boolean that sets the mountpoint readOnly or readWrite.
    66  * **user** maps all access to this user. Default is `root`.
    67  * **group** maps all access to this group. Default is `nfsnobody`.
    68  
    69  Creating the pod:
    70  
    71  ```bash
    72  $ kubectl create -f examples/volumes/quobyte/quobyte-pod.yaml
    73  ```
    74  
    75  Verify that the pod is running:
    76  
    77  ```bash
    78  $ kubectl get pods quobyte
    79  NAME      READY     STATUS    RESTARTS   AGE
    80  quobyte   1/1       Running   0          48m
    81  
    82  $ kubectl get pods quobyte --template '{{.status.hostIP}}{{"\n"}}'
    83  10.245.1.3
    84  ```
    85  
    86  SSH onto the Machine and validate that quobyte is mounted:
    87  
    88  ```bash
    89  $ mount | grep quobyte
    90  quobyte@10.239.10.21:7861/ on /var/lib/kubelet/plugins/kubernetes.io~quobyte type fuse (rw,nosuid,nodev,noatime,user_id=0,group_id=0,default_permissions,allow_other)
    91  
    92  $ docker inspect --format '{{ range .Mounts }}{{ if eq .Destination "/mnt"}}{{ .Source }}{{ end }}{{ end }}' 55ab97593cd3
    93  /var/lib/kubelet/plugins/kubernetes.io~quobyte/root#root@testVolume
    94  ```
    95  
    96  <!-- BEGIN MUNGE: GENERATED_ANALYTICS -->
    97  [![Analytics](https://kubernetes-site.appspot.com/UA-36037335-10/GitHub/examples/volumes/quobyte/Readme.md?pixel)]()
    98  <!-- END MUNGE: GENERATED_ANALYTICS -->