kind: Deployment apiVersion: apps/v1 metadata: namespace: dev-1 name: zookeeper labels: app: zookeeper spec: replicas: 1 selector: matchLabels: app: zookeeper template: metadata: labels: app: zookeeper spec: volumes: - name: zk-data # This AWS EBS volume must already exist. awsElasticBlockStore: volumeID: "vol-0b82009bc9cba06b4" fsType: ext4 containers: - name: zookeeper image: zookeeper ports: - containerPort: 2181 volumeMounts: - name: zk-data readOnly: false mountPath: "/data/zk-data" env: - name: ZOO_DATA_DIR value: '/data/zk-data' --- apiVersion: v1 kind: Service metadata: name: zookeeper namespace: dev-1 labels: app: zookeeper spec: ports: - port: 2181 name: zookeeper selector: app: zookeeper