blob: 2991e1a211c270bdef6758f58860db238bd8d228 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
|
# Kafka as Kubernetes PetSet
Example of three Kafka brokers depending on three Zookeeper instances.
## Set up volume claims
This step can be skipped in clusters that support automatic volume provisioning, such as GKE.
You need this step in Minikube.
```
./zookeeper/bootstrap/pv.sh
kubectl create -f ./zookeeper/bootstrap/pvc.yml
```
```
./bootstrap/pv.sh
kubectl create -f ./bootstrap/pvc.yml
# check that claims are bound
kubectl get pvc
```
The volume size in the example is very small. The numbers don't really matter as long as they match. Minimal size on GKE is 1 GB.
## Set up Zookeeper
This module contains a copy of `pets/zookeeper/` from https://github.com/kubernetes/contrib.
See the `./zookeeper` folder and follow the README there.
## Start Kafka
```
kubectl create -f ./
```
## Testing manually
See `./test/test.sh`.
|