Skip to content

Commit

Permalink
Adds storage class for Zookeeper, with sample manifests
Browse files Browse the repository at this point in the history
This reverts commit efb1019.
  • Loading branch information
solsson committed Jul 29, 2017
1 parent 1aac57a commit ede8040
Show file tree
Hide file tree
Showing 4 changed files with 22 additions and 1 deletion.
7 changes: 7 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ How to use:
* Kafka for real: fork and have a look at [addon](https://github.com/Yolean/kubernetes-kafka/labels/addon)s.
* Join the discussion in issues and PRs.


Why?
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.
Back when we read [Newman](http://samnewman.io/books/building_microservices/) we were beginners with both.
Expand All @@ -25,6 +26,12 @@ The goal is to provide [Bootstrap servers](http://kafka.apache.org/documentation

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

## Prepare storage classes

For Minikube run `kubectl create -f configure-minikube/`.

There's a similar setup for GKE, in `configure-gke` of course. You might want to tweak it before creating.

## Start Zookeeper

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.
Expand Down
7 changes: 7 additions & 0 deletions configure-gke/storageclass-zookeeper-gke.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
kind: StorageClass
apiVersion: storage.k8s.io/v1
metadata:
name: kafka-zookeeper
provisioner: kubernetes.io/gce-pd
parameters:
type: pd-ssd
5 changes: 5 additions & 0 deletions configure-minikube/storageclass-zookeeper-minikube.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
kind: StorageClass
apiVersion: storage.k8s.io/v1
metadata:
name: kafka-zookeeper
provisioner: k8s.io/minikube-hostpath
4 changes: 3 additions & 1 deletion zookeeper/50pzoo.yml
Original file line number Diff line number Diff line change
Expand Up @@ -67,8 +67,10 @@ spec:
volumeClaimTemplates:
- metadata:
name: data
annotations:
volume.beta.kubernetes.io/storage-class: kafka-zookeeper
spec:
accessModes: [ "ReadWriteOnce" ]
resources:
requests:
storage: 10Gi
storage: 1Gi

0 comments on commit ede8040

Please sign in to comment.