apiVersion: apps/v1
kind: Deployment
metadata:
  labels:
    app: kafka
    component: zookeeper
  name: zookeeper
spec:
  replicas: 1
  selector:
    matchLabels:
      app: kafka
      component: zookeeper
  template:
    metadata:
      labels:
        app: kafka
        component: zookeeper
    spec:
      containers:
        - name: zookeeper
          image: confluentinc/cp-zookeeper:7.2.1
          ports:
            - containerPort: 2181
          env:
            - name: ZOOKEEPER_ID
              value: "1"
            - name: ZOOKEEPER_SERVER_1
              value: zookeeper
            - name: ZOOKEEPER_CLIENT_PORT
              value: 2181
