• Documentation
  • Blog

›Guides

Getting Started

  • Introduction
  • Networking Considerations
  • Multi-Tenancy Considerations

Guides

  • Web UI Installation
  • Bare Metal Installation
  • Docker Integration
  • Docker Plugin
  • Kubernetes Quick Start "Solo"
  • Kubernetes Integration
  • Kubernetes CSI
Edit

Kubernetes CSI

Usage:

  1. Deploy NexentaEdge cluster on Baremetal or NexentaEdge DevOps edition cluster.

  2. Download NexentaEdge CSI plugin repository from https://github.com/Nexenta/nexentaedge-csi-driver

    Move to plugin folder

    cd /nexentaedge-csi-driver
    
  3. Configure CSI driver options and NexentaEdge cluster discovery via kubernetes secret

    Configuration file placed at ./kubernetes/secret/cluster-config.json

    The secret intended to configure both NexentaEdge clusters - standalone as well as In-Cluster NexentaEdge cluster deployment

Secret file configuration options:

{
    "nedgerest":        "1.1.1.1",
    "nedgeport":        "8080",
    "username":         "admin",
    "password":         "TQpcVgoSLA==",
    "cluster":          "clu1",
    "tenant":           "ten1",
    "chunksize":        1048576,
    "serviceFilter":    ""
}

Configuration parameters and default values

NameDescriptionDefault valueRequired
nedgerestIP or FQDN of NexentaEdge REST API server in case of standalone(baremenal) NexentaEdge clustertrue
nedgeportPort of NexentaEdge REST API server8080true
usernameNexentaEdge REST API server user name"admin"true
passwordNexentaEdge REST API server encrypted password. Encrypted password could be found in /opt/nedge/neadm/.neadmrc file on NexentaEdge management node or during password change in NexentaEdge CLI"TQpcVgoSLA=="true
clusterNexentaEdge cluster namespacefalse
tenantNexentaEdge tenant namespacefalse
chunksizeDefault volume chunksize in bytes, should be power of two1048576false
forceBucketDeletionOn docker volume remove operation - the bucket will also be deletedfalsefalse
serviceFilterList of comma delimeted allowed service names to filter"" means all services allowedfalse
serviceBalancerPolicyDefines how to select service to mount if not specified by volume path"minExportsPolicy"false
nfsMountOptionsOptions to mount NexentaEdge export on k8s node, distinct options should be separated by comma in string"ver=3,tcp"false

serviceBalancerPolicy options (when serviceFilter defined then serviceBalancerPolicy will be applied to its services only!)

    minExportsPolicy     : plugin selects service with minimal nfs exports on it
    randomServicePolicy  : plugin selects service randomly

Note: Configuration parameters names are case insensitive

If 'nedgerest' parameter is absent then NexentaEdge cluster will be discovered in CSI plugin namespace 'nedge'

Configure NexentaEdge cluster and create secret

Check configuration options and create kubernetes secret for NexentaEdge CSI plugin

kubectl create secret generic nexentaedge-cluster --from-file=./kubernetes/secret/cluster-config.json 

Deploy NexentaEdge CSI plugin

To deploy NexentaEdge CSI plugin

kubectl apply -f ./kubernetes/

There should be three NexentaEdge VSI plugin pods available

...
NAMESPACE     NAME                                    READY     STATUS    RESTARTS   AGE
default       csi-attacher-nedgeplugin-0              2/2       Running   0          18s
default       csi-provisioner-nedgeplugin-0           2/2       Running   0          18s
default       nexentaedge-csi-plugin-7s6wc            2/2       Running   0          19s

Note:

For multiple nodes k8s cluster there should be one nexentaedge-csi-plugin-xxxxx pod per Kubernetes node

Pre-provisioned volumes (NFS) on NexentaEdge cluster

Allow to use already created exports in NexentaEdge services Customer should be able to create PersistentVolume specification

link to Pre-provisioned volumes manifest specification

To test creation and mount pre-provisioned volume to pod execute example

Note:

Make sure that volumeHandle: clus1/ten1/buk1 in nginx.yaml already exist on NexentaEdge cluster

Examples:

kubectl apply -f examples/pre-provisioned-nginx.yaml #one pod with pre-provisioned volume
kubectl apply -f examples/deployment.yaml            # 10 pods deployment shares one NexentaEdge bucket

Dynamically provisioned volumes (NFS)

To setup the system for dynamic provisioning, the administrator needs to setup a StorageClass pointing to the CSI driver’s external-provisioner and specifying any parameters required by the driver

link to dynamically provisioned volumes specification

Note:

For dynamically provisioned volumes kubernetes will generate volume name automatically (for example pvc-871068ed-8b5d-11e8-9dae-005056b37cb2) Additional creation options should be passed as parameters in storage class definition i.e :

apiVersion: storage.k8s.io/v1
kind: StorageClass
metadata:
  name: csi-sc-nedgeplugin
provisioner: nexentaedge-csi-plugin
parameters:
  tenant: ten1
  encryption: true

Options:

NameDescriptionAllowed valuesDefault value
clusterNexentaEdge cluster namespace if not defined in secret
tenantNexentaEdge tenant namespace if not defined in secret
chunksizeChunk size for actual volume, in bytesshould be power of two1048576 bytes
aclVolume acl restrictionsall
ecEnables ccow erasure coding for volumetrue, false, 0, 1false
ecmodeSet ccow erasure mode data mode (If 'ec' option enabled)"4:2:rs" ,"6:2:rs", "9:3:rs"6:2:rs
encryptionEnables encryption for volumetrue, false, 0, 1false

Note:

Options are case sensitive and should be in lower case

Example:

kubectl apply -f examples/dynamic-nginx.yaml

Troubleshooting and log collection

In case any problems using NexentaEdge CSI driver

  1. Check CSI plugin pods state
kubectl describe pod nexentaedge-csi-plugin-xxxxx
  1. Check provisioned pods state
kubectl describe pods nginx
  1. Check CSI plugin logs
kubectl logs csi-attacher-nedgeplugin-0 -c nfs
kubectl logs csi-provisioner-nedgeplugin-0 -c nfs
kubectl logs nexentaedge-csi-plugin-j8ljf -c nfs
← Installation NexentaEdge DevOps Edition as a Kubernetes cluster
NexentaEdge Product Page
Copyright © 2018 Nexenta Systems, Inc.