From 2ca4453d7e9da4b7089fc41e0c41e89ab5e5f8cc Mon Sep 17 00:00:00 2001 From: Staffan Olsson Date: Thu, 3 Aug 2017 15:23:38 +0200 Subject: [PATCH 1/3] The default is Delete, which violates our no-surpises ambition --- README.md | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/README.md b/README.md index e0cdf911..467e158d 100644 --- a/README.md +++ b/README.md @@ -59,6 +59,14 @@ For clusters that enfoce [RBAC](https://kubernetes.io/docs/admin/authorization/r kubectl apply -f rbac-namespace-default/ ``` +## Set "reclaim policy" for persistent volumes + +Caution: For each new kafka and pzoo pod you have to [manually set Reclaim Policy](https://kubernetes.io/docs/tasks/administer-cluster/change-pv-reclaim-policy/) +to avoid losing your data if the [PVC](https://kubernetes.io/docs/concepts/storage/persistent-volumes/#persistentvolumeclaims)s or [PV](https://kubernetes.io/docs/concepts/storage/persistent-volumes/#persistent-volumes)s are deleted, +including if the `kafka` namespace is deleted and recreated. + +See [feature#352](https://github.com/kubernetes/features/issues/352) [#38192](https://github.com/kubernetes/kubernetes/issues/38192) [#47987](https://github.com/kubernetes/kubernetes/pull/47987) for details on why this isn't supported (yet) in manifests. + # Tests ``` From 7e83bac0e2761d610f165b29a183a4d8bedfd491 Mon Sep 17 00:00:00 2001 From: Staffan Olsson Date: Fri, 4 Aug 2017 06:59:35 +0200 Subject: [PATCH 2/3] Shorter, possibly clearer --- README.md | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index 467e158d..eb87e80f 100644 --- a/README.md +++ b/README.md @@ -59,13 +59,13 @@ For clusters that enfoce [RBAC](https://kubernetes.io/docs/admin/authorization/r kubectl apply -f rbac-namespace-default/ ``` -## Set "reclaim policy" for persistent volumes +## Caution: `Delete` Reclaim Policy is default -Caution: For each new kafka and pzoo pod you have to [manually set Reclaim Policy](https://kubernetes.io/docs/tasks/administer-cluster/change-pv-reclaim-policy/) -to avoid losing your data if the [PVC](https://kubernetes.io/docs/concepts/storage/persistent-volumes/#persistentvolumeclaims)s or [PV](https://kubernetes.io/docs/concepts/storage/persistent-volumes/#persistent-volumes)s are deleted, -including if the `kafka` namespace is deleted and recreated. +In production you likely want to [manually set Reclaim Policy](https://kubernetes.io/docs/tasks/administer-cluster/change-pv-reclaim-policy/), +our your data will be gone if the generated [volume claim](https://kubernetes.io/docs/concepts/storage/persistent-volumes/#persistentvolumeclaims)s are deleted. -See [feature#352](https://github.com/kubernetes/features/issues/352) [#38192](https://github.com/kubernetes/kubernetes/issues/38192) [#47987](https://github.com/kubernetes/kubernetes/pull/47987) for details on why this isn't supported (yet) in manifests. +This can't be done [in manifests](https://github.com/Yolean/kubernetes-kafka/pull/50), +at least not [until Kubernetes 1.8](https://github.com/kubernetes/features/issues/352). # Tests From 4d3754dc039cdab28c8067089989b436ef737209 Mon Sep 17 00:00:00 2001 From: Staffan Olsson Date: Tue, 8 Aug 2017 12:39:34 +0200 Subject: [PATCH 3/3] Still short --- README.md | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index eb87e80f..c4b545e9 100644 --- a/README.md +++ b/README.md @@ -11,11 +11,13 @@ 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. +No readable readme can properly introduce both [Kafka](http://kafka.apache.org/) and [Kubernets](https://kubernetes.io/), +but we think the combination of the two is a great backbone for microservices. Back when we read [Newman](http://samnewman.io/books/building_microservices/) we were beginners with both. Now we've read [Kleppmann](http://dataintensive.net/), [Confluent](https://www.confluent.io/blog/) and [SRE](https://landing.google.com/sre/book.html) and enjoy this "Streaming Platform" lock-in :smile:. +We also think the plain-yaml approach of this project is easier to understand and evolve than [helm](https://github.com/kubernetes/helm) [chart](https://github.com/kubernetes/charts/tree/master/incubator/kafka)s. + ## What you get Keep an eye on `kubectl --namespace kafka get pods -w`. @@ -50,7 +52,7 @@ kubectl -n kafka logs kafka-0 | grep "Registered broker" That's it. Just add business value :wink:. For clients we tend to use [librdkafka](https://github.com/edenhill/librdkafka)-based drivers like [node-rdkafka](https://github.com/Blizzard/node-rdkafka). To use [Kafka Connect](http://kafka.apache.org/documentation/#connect) and [Kafka Streams](http://kafka.apache.org/documentation/streams/) you may want to take a look at our [sample](https://github.com/solsson/dockerfiles/tree/master/connect-files) [Dockerfile](https://github.com/solsson/dockerfiles/tree/master/streams-logfilter)s. -Don't forget the [addon](https://github.com/Yolean/kubernetes-kafka/labels/addon)s. +And don't forget the [addon](https://github.com/Yolean/kubernetes-kafka/labels/addon)s. ## RBAC @@ -67,7 +69,7 @@ our your data will be gone if the generated [volume claim](https://kubernetes.io This can't be done [in manifests](https://github.com/Yolean/kubernetes-kafka/pull/50), at least not [until Kubernetes 1.8](https://github.com/kubernetes/features/issues/352). -# Tests +## Tests ``` kubectl apply -f test/