Skip to content

Commit

Permalink
init project with prd
Browse files Browse the repository at this point in the history
  • Loading branch information
maxsxu committed Feb 13, 2022
0 parents commit 7a9c800
Showing 1 changed file with 61 additions and 0 deletions.
61 changes: 61 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -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`

0 comments on commit 7a9c800

Please sign in to comment.