From 7a9c80079932c0081677134d94d3c3ed758075da Mon Sep 17 00:00:00 2001 From: Max Xu Date: Sun, 13 Feb 2022 16:35:14 +0800 Subject: [PATCH] init project with prd --- README.md | 61 +++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 61 insertions(+) create mode 100644 README.md diff --git a/README.md b/README.md new file mode 100644 index 0000000..98427c7 --- /dev/null +++ b/README.md @@ -0,0 +1,61 @@ +# Zookeeper Operator + +A simple Zookeeper Operator, which is responsible for operating zookeeper cluster. + +What we have? + +- [ ] Deploy a zookeeper cluster quickly +- [ ] Zookeeper configurations load +- [ ] Expose zookeeper service to user +- [ ] Zookeeper status from `zk-cli stat` + +What not provided? + +- [x] Zookeeper configurations reload +- [x] Webhook + +## Installation +1. Deploy the CRD + +``` +kubectl create -f zk-crd.yaml +``` + +2. Deploy the Controller + +``` +kubectl create -f zk-controller.yaml +``` + +## Usage +1. Create a CR named `zk-cr.yaml` with below contents to setup a 3-node zookeeper cluster + +```yaml +apiVersion: "zookeeper.atmax.io/v1alpha1" +kind: "ZookeeperCluster" +metadata: + name: "zookeeper" +spec: + replicas: 3 + config: + - ZOO_TICK_TIME: 2000 + - ZOO_INIT_LIMIT: 5 + - ZOO_SYNC_LIMIT: 2 +``` + +2. Deploy this CR + +``` +kubectl create -f zk-cr.yaml +``` + +3. Observe the cluster status + +``` +➜ kubectl get zookeeper + +NAME READY ADDRESS +zookeeper 3/3 10.0.0.1:2181 +``` + +Then user can access the Zookeeper cluster via `10.0.0.1:2181` \ No newline at end of file