From b3ec3b4d170fd67714541e199637591b662e4f41 Mon Sep 17 00:00:00 2001 From: "OTSUKA, Yuanying" Date: Sat, 11 Jul 2020 08:03:17 +0000 Subject: [PATCH] Add README --- README.md | 57 +++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 57 insertions(+) create mode 100644 README.md diff --git a/README.md b/README.md new file mode 100644 index 0000000..a9ade1d --- /dev/null +++ b/README.md @@ -0,0 +1,57 @@ +zfs-operator +============= + +![envtest](https://github.com/yuanying/zfs-operator/workflows/envtest/badge.svg) + +zfs-operator is a light-weight Kubernetes Operator that operates ZFS Dataset on Node (currently only ZVOL). + +Architecture +------------ + +zfs-operator manages zfs datasets using zfs cli, so this operator should be placed on each nodes. + +Concepts +-------- + +### Volume + +Volume is a representation of ZVOL. + +```yaml +apiVersion: zfs.unstable.cloud/v1alpha1 +kind: Volume +metadata: + name: volume-sample +spec: + nodeName: node01 + volumeName: "tank/sample" + capacity: + storage: 5Gi + properties: + key: value +``` + +Installation +------------ + +zfs-operator runs within your Kubernetes cluster as a series of daemonset resources. It utilizes `CustomResourceDefinitions` to configure zfs datasets. + +It is deployed using regular YAML manifests, like any other application on Kubernetes. + +```bash +$ kubectl kustomize "github.com/yuanying/zfs-operator.git/config/default?ref=master" | kubectl apply -f - +``` + +Usually, there are only a few nodes where you want to install zfs-operator to manage zfs dataset. This manifest assumes such cases. Please label your node where you want to install this operator like following. + +```bash +$ kubectl label node ${ZFS_NODE} zfs.unstable.cloud/storage= +``` + +If zfs-operator is installed successfully, you can see some pods in zfs-operator-system namespace like this. + +```bash +$ kubectl get pod -o wide +NAME READY STATUS RESTARTS AGE IP NODE NOMINATED NODE READINESS GATES +zfs-operator-zfs-node-74wkf 2/2 Running 42 11d 10.244.1.10 ${ZFS_NODE} +```