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 Aug 8, 2017
1 parent 11496d2 commit c3969a8
Show file tree
Hide file tree
Showing 4 changed files with 21 additions and 1 deletion.
6 changes: 6 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,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 @@ -61,8 +61,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 c3969a8

Please sign in to comment.