-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
57 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,57 @@ | ||
zfs-operator | ||
============= | ||
|
||
 | ||
|
||
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} <none> <none> | ||
``` |