Skip to content

Commit 65bed45

Browse files
committed
Adds storage class for Zookeeper, with sample manifests
This reverts commit efb1019.
1 parent 7a1173b commit 65bed45

File tree

4 files changed

+22
-1
lines changed

4 files changed

+22
-1
lines changed

README.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ How to use:
1111
* Kafka for real: fork and have a look at [addon](https://github.com/Yolean/kubernetes-kafka/labels/addon)s.
1212
* Join the discussion in issues and PRs.
1313

14+
1415
Why?
1516
See for yourself, but we think this project gives you better adaptability than [helm](https://github.com/kubernetes/helm) [chart](https://github.com/kubernetes/charts/tree/master/incubator/kafka)s. No single readable readme or template can properly introduce both Kafka and Kubernets.
1617
Back when we read [Newman](http://samnewman.io/books/building_microservices/) we were beginners with both.
@@ -25,6 +26,12 @@ The goal is to provide [Bootstrap servers](http://kafka.apache.org/documentation
2526

2627
Zookeeper at `zookeeper.kafka.svc.cluster.local:2181`.
2728

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

3037
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
@@ -67,8 +67,10 @@ spec:
6767
volumeClaimTemplates:
6868
- metadata:
6969
name: data
70+
annotations:
71+
volume.beta.kubernetes.io/storage-class: kafka-zookeeper
7072
spec:
7173
accessModes: [ "ReadWriteOnce" ]
7274
resources:
7375
requests:
74-
storage: 10Gi
76+
storage: 1Gi

0 commit comments

Comments
 (0)