apiVersion: v1 | |
kind: Service | |
metadata: | |
name: zoo | |
namespace: voltha | |
spec: | |
clusterIP: None | |
selector: | |
app: zookeeper | |
ports: | |
- name: client | |
port: 2181 | |
targetPort: 2181 | |
- name: follower | |
port: 2888 | |
targetPort: 2888 | |
- name: leader | |
port: 3888 | |
targetPort: 3888 | |
--- | |
apiVersion: apps/v1beta1 | |
kind: StatefulSet | |
metadata: | |
name: zookeeper | |
namespace: voltha | |
spec: | |
serviceName: zoo | |
replicas: 1 | |
selector: | |
matchLabels: | |
app: zookeeper | |
template: | |
metadata: | |
labels: | |
app: zookeeper | |
annotations: | |
cni: "calico" | |
spec: | |
containers: | |
- name: zoo | |
image: zookeeper:3.4.11 | |
ports: | |
- containerPort: 2181 | |
- containerPort: 2888 | |
- containerPort: 3888 | |
env: | |
- name: NAMESPACE | |
valueFrom: | |
fieldRef: | |
fieldPath: metadata.namespace | |
- name: ZOO_MY_ID | |
value: "1" | |
# - name: ZOO_SERVERS | |
# value: > | |
# server.1=zookeeper1-0.zoo1.$(NAMESPACE).svc.cluster.local:2888:3888 | |