Open EricVS opened 6 years ago
I had the same issue. What I did was I created a PersistentVolume
using
kind: PersistentVolume
apiVersion: v1
metadata:
name: kafka-pv-volume
labels:
type: local
spec:
storageClassName: manual
capacity:
storage: 5Gi
accessModes:
- ReadWriteOnce
hostPath:
path: "/home/ec2-user/kafka-data"
Then in the kafka-config i added:
-----------
-----------
volumeMounts:
- name: kafka-pv-volume
mountPath: /var/lib/kafka
-----------
-----------
volumeClaimTemplates:
- metadata:
name: kafka-pv-volume
spec:
storageClassName: manual
accessModes: [ "ReadWriteOnce" ]
resources:
requests:
storage: 2Gi
Let me know if that helps
Hi, Thanks for your reply and feedback. I could get it to work with your solution but only on my localhost (Mac with Docker for Mac Beta with Kubernetes) When I tried to deploy on my Kubernetes cluster it failed. I fixed (worked around) by configuring GlusterFS and use that for PersistentVolume. Works like a charm with regards to the storage. Zookeeper running perfectly but still an error when starting up Kafka not being able to get metadata from list (localhost:9093). Did you encounter that too? Kind regards,
Eric V.
Hi, I'm trying to use your template to setup Kafka/Zookeeper on Kubernetes but am having a hard time understanding the link between PersistentVolume and volumeClaimTemplates. Would you mind commenting on how to create the PersistentVolume pointing to a local path? I have this setup, but when I apply your manifest I get the error below...
Error is:
and the Persistent Volume Claims stay in pending.
Any help is greatly appreciated.
Kind regards,
Eric V.