Updatestretegy is not working with elasticsearch master

Running elasticsearch master in kubernetes as a statefulset. Updatestretegy works with elasticsearch coordinating but not with elasticsearch master i.e pods are not getting terminated and started again after kubectl apply.

I'm using the below additional setting-:
updateStrategy:
type: RollingUpdate

also
terminationGracePeriodSeconds: 10

full statefulset-

apiVersion: apps/v1beta1
kind: StatefulSet
metadata:
name: es-master
labels:
app: observability
role: master
spec:
serviceName: es-master
replicas: 2
updateStrategy:
type: RollingUpdate
template:
metadata:
labels:
app: observability
role: master
spec:
terminationGracePeriodSeconds: 10
initContainers:
- image: docker.apple.com/gbiinfra/elk-k8s/busybox
name: init-sysctl
imagePullPolicy: Always
command: ["sh", "-c", "chown -R 1000:100 /usr/share/elasticsearch/data"]
volumeMounts:
- name: es-master-data
mountPath: /usr/share/elasticsearch/data
imagePullSecrets:
- name: jetstream-secret-{namespace}
terminationGracePeriodSeconds: 10
containers:
- name: es-master
image: {dockerPath}
imagePullPolicy: Always
env:
- name: ES_JAVA_OPTS
value: -XX:UseAVX=2 -XX:-AssumeMP -Xms2048m -Xmx2048m
- name: PROCESSORS
valueFrom:
resourceFieldRef:
resource: limits.cpu
resources:
requests:
cpu: 1
memory: 3500Mi
limits:
cpu: 2
memory: 5000Mi
ports:
- containerPort: 9200
name: http
- containerPort: 9300
name: transport
readinessProbe:
tcpSocket:
port: 9200
timeoutSeconds: 1
successThreshold: 3
livenessProbe:
tcpSocket:
port: 9200
initialDelaySeconds: 360
timeoutSeconds: 2
volumeMounts:
- name: es-master-data
mountPath: /usr/share/elasticsearch/data
- name: config
mountPath: /usr/share/elasticsearch/config/elasticsearch.yml
subPath: elasticsearch.yml
- name: config
mountPath: /usr/share/elasticsearch/config/log4j2.properties
subPath: log4j2.properties
- name: splunkforwarder-temp
mountPath: "/opt/splunk/var"
- name: splunkforwarder
image: "docker.apple.com/splunk-ist/splunk-universalforwarder:7.1.2.23@sha256:5c014e573e68e1b0f83c86686ab86f896d6e339875051f65df41a1cd1a2deba4"
resources:
requests:
cpu: 400m
memory: 512Mi
limits:
cpu: 800m
memory: 1024Mi
env:
- name: SPLUNK_CLUSTER
value: "{splunk_cluster}"
- name: SPLUNK_LOG_MONITOR
value: "/usr/share/elasticsearch/data/elasticsearch/elasticsearch/elasticsearch.log|wingu_app|elasticsearch-logs"
volumeMounts:
- name: es-master-data
mountPath: "/usr/share/elasticsearch/data/"
- name: splunkforwarder-temp
mountPath: "/opt/splunk/var"
- name: podinfo
mountPath: "/etc/splunk/podinfo"
readOnly: true
volumes:
- name: splunkforwarder-temp
emptyDir: {}
- name: es-master-data
emptyDir: {}
- name: es-master-data
persistentVolumeClaim:
claimName: es-master-data
- name: config
configMap:
name: es-master
- name: podinfo
downwardAPI:
items:
- path: "labels"
fieldRef:
fieldPath: metadata.labels
- path: "uid"
fieldRef:
fieldPath: metadata.uid
volumeClaimTemplates:

  • metadata:
    name: es-master-data
    spec:
    accessModes:
    - ReadWriteOnce
    resources:
    requests:
    storage: 8Gi

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.