apiVersion: apps/v1
kind: Deployment
metadata:
  name: app-zookeeper
  namespace: zookeeper
  labels:
    app: zookeeper
spec:
  replicas: 1
  selector:
    matchLabels:
      app: zookeeper
  strategy:
    type: Recreate
  template:
    metadata:
      labels:
        app: zookeeper
    spec:
      containers:
        - image: confluentinc/cp-zookeeper:5.0.0
          name: zookeeper-app
          env:
            - name: ZOOKEEPER_CLIENT_PORT
              value: "32181"
            - name: ZOOKEEPER_TICK_TIME
              value: "2000"
          ports:
            - containerPort: 32181
              name: zookeeper
#          volumeMounts:
#            - name: zookeeper-persistent-storage
#              mountPath: /var/lib/zookeeper
#      volumes:
#        - name: zookeeper-persistent-storage
#          persistentVolumeClaim:
#            claimName: zookeeper-pvc