apiVersion: apps/v1
kind: StatefulSet
metadata:
  name: zookeeper
spec:
  selector:
    matchLabels:
      app: zookeeper
  serviceName: zookeeper
  replicas: 1
  template:
    metadata:
      labels:
        app: zookeeper
    spec:
      containers:
      - name: zoo1
        image: zookeeper
        imagePullPolicy: IfNotPresent
        resources:
          requests:
            cpu: 128m
            memory: 500Mi
          limits:
            cpu: 128m
            memory: 500Mi
        ports:
        - containerPort: 2181
        env:
        - name: ZK_SERVER_HEAP
          value: "256"
        - name: ZOOKEEPER_ID
          value: "1"
        - name: ZOOKEEPER_SERVER_1
          value: zoo1
