Discover Packages
github.com/nifcloud/nifcloud-hatoba-disk-csi-driver
module
Version:
v1.0.0
Opens a new window with list of versions in this module.
Published: Nov 16, 2022
License: Apache-2.0
Opens a new window with license information.
README
README
¶
nifcloud-hatoba-disk-csi-driver
Overview
The NIFCLOUD Hatoba Disk Container Storage Interface (CSI) Driver provides a CSI interface used by Container Orchestrators to manage the lifecycle of Hatoba Disks.
Usage
Deploy CSI Driver
Use NIFCLOUD Kubernetes Service Hatoba CSI driver addon (RECOMMENDED )
See the document .
Manual Deploy
Create NIFCLOUD secret.
vi deploy/kubernetes/secret.yaml
kubectl apply -f deploy/kubernetes/secret.yaml
Set the NIFCLOUD_HATOBA_CLUSTER_NRN
environment variable.
vi deploy/kubernetes/overlys/stable/controller.yaml
Deploy drivers.
kubectl apply -k deploy/kubernetes/overlays/stable
Create PV
Create storage class.
kind: StorageClass
apiVersion: storage.k8s.io/v1
metadata:
name: hatoba-disk-high-speed-flash-a
provisioner: disk.csi.hatoba.nifcloud.com
volumeBindingMode: WaitForFirstConsumer
parameters:
csi.storage.k8s.io/fstype: ext4
type: high-speed-flash-a
allowVolumeExpansion: true
Create PVC and Pod.
apiVersion: apps/v1
kind: StatefulSet
metadata:
name: web
spec:
serviceName: "nginx"
replicas: 2
selector:
matchLabels:
app: nginx
template:
metadata:
labels:
app: nginx
spec:
containers:
- name: nginx
image: k8s.gcr.io/nginx-slim:0.8
ports:
- containerPort: 80
name: web
volumeMounts:
- name: www
mountPath: /usr/share/nginx/html
volumeClaimTemplates:
- metadata:
name: www
spec:
accessModes: [ "ReadWriteOnce" ]
storageClassName: hatoba-disk-high-speed-flash-a
resources:
requests:
storage: 10Gi
Driver will craete new disk and attach it to node.
kubectl get pvc
kubectl get pv
kubectl get pods
CreateVolume Parameters
There are several optional parameters that could be passes into CreateVolumeRequest.parameters map:
csi.storage.k8s.io/fsType
description
File system type that will be formatted during volume creation
values
default
ext4
type
description
Storage type (See https://pfs.nifcloud.com/service/disk.htm )
values
standard-flash-a
standard-flash-b
standard-flash (randomly select a or b)
high-speed-flash-a
high-speed-flash-b
high-speed-flash (randomly select a or b)
default
standard-flash-a
Expand ▾
Collapse ▴
Directories
¶
pkg
cloud
Package cloud is a generated GoMock package.
Package cloud is a generated GoMock package.
driver
Package driver is a generated GoMock package.
Package driver is a generated GoMock package.
Click to show internal directories.
Click to hide internal directories.