Skip to content

Commit c3969a8

Browse files
committed
Adds storage class for Zookeeper, with sample manifests
This reverts commit efb1019.
1 parent 11496d2 commit c3969a8

File tree

4 files changed

+21
-1
lines changed

4 files changed

+21
-1
lines changed

README.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,12 @@ The goal is to provide [Bootstrap servers](http://kafka.apache.org/documentation
2727

2828
Zookeeper at `zookeeper.kafka.svc.cluster.local:2181`.
2929

30+
## Prepare storage classes
31+
32+
For Minikube run `kubectl create -f configure-minikube/`.
33+
34+
There's a similar setup for GKE, in `configure-gke` of course. You might want to tweak it before creating.
35+
3036
## Start Zookeeper
3137

3238
The [Kafka book](https://www.confluent.io/resources/kafka-definitive-guide-preview-edition/) recommends that Kafka has its own Zookeeper cluster with at least 5 instances.
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
kind: StorageClass
2+
apiVersion: storage.k8s.io/v1
3+
metadata:
4+
name: kafka-zookeeper
5+
provisioner: kubernetes.io/gce-pd
6+
parameters:
7+
type: pd-ssd
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
kind: StorageClass
2+
apiVersion: storage.k8s.io/v1
3+
metadata:
4+
name: kafka-zookeeper
5+
provisioner: k8s.io/minikube-hostpath

zookeeper/50pzoo.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,8 +61,10 @@ spec:
6161
volumeClaimTemplates:
6262
- metadata:
6363
name: data
64+
annotations:
65+
volume.beta.kubernetes.io/storage-class: kafka-zookeeper
6466
spec:
6567
accessModes: [ "ReadWriteOnce" ]
6668
resources:
6769
requests:
68-
storage: 10Gi
70+
storage: 1Gi

0 commit comments

Comments
 (0)