Hello I try to deploy Zookeeper in Kubernetes with this yaml file:
apiVersion: apps/v1
kind: Deployment
metadata:
name: zookeeper-cluster-import-deployment
namespace: mynamespace
labels:
name : zookeeper-cluster-import
app : zookeeper-cluster-import
spec:
replicas: 1
strategy:
type: Recreate
selector:
matchLabels:
app: zookeeper-cluster-import
template:
metadata:
labels:
app: zookeeper-cluster-import
spec:
restartPolicy: Always
containers:
- name: zookeeper
image: dockerbase_zookeeper:v01
imagePullPolicy: IfNotPresent
ports:
- containerPort: 2181
name: zookeeper
env:
- name: ALLOW_ANONYMOUS_LOGIN
value: "yes"
- name: ZOO_4LW_COMMANDS_WHITELIST
value: "ruok"
livenessProbe:
exec:
command: ['/bin/bash', '-c', 'echo "ruok" | nc -w 2 localhost 2181 | grep imok']
initialDelaySeconds: 60
periodSeconds: 10
timeoutSeconds: 5
failureThreshold: 6
successThreshold: 1
readinessProbe:
exec:
command: ['/bin/bash', '-c', 'echo "ruok" | nc -w 2 localhost 2181 | grep imok']
initialDelaySeconds: 120
periodSeconds: 10
timeoutSeconds: 5
failureThreshold: 6
successThreshold: 1
resources:
requests:
cpu: 400m
memory: 2Gi
limits:
cpu: 500m
memory: 2Gi
securityContext:
allowPrivilegeEscalation: false
privileged: false
runAsGroup: 1000
runAsUser: 1000
imagePullSecrets:
- name: secret-repos
volumes:
- name: pv-01
persistentVolumeClaim:
claimName: pv-claim-01
But when I apply this yaml I have "Liveness probe failed" and in the pod logs I see at the end of the logs : The list of enabled four letter word commands is : [[srvr]]
I don't understand because in env I did :
- name: ZOO_4LW_COMMANDS_WHITELIST
value: "ruok"
It is like the command is not recognized.