I am using the following manifest to create my Elasticsearch
resource.
I would expect that since for each set of nodes (master
/ data
) I only have one container
specification, only one of them would be created in each pod
apiVersion: elasticsearch.k8s.elastic.co/v1
kind: Elasticsearch
metadata:
name: elasticsearch-sample
namespace: eck-poc
spec:
version: 7.11.0
nodeSets:
- name: master
config:
node.roles: ["master"]
node.store.allow_mmap: false
podTemplate:
metadata:
labels:
env: eck-poc-master
spec:
containers:
- name: elasticsearch-master
image: docker.elastic.co/elasticsearch/elasticsearch:7.11.0
# specify resource limits and requests
resources:
requests:
memory: 2Gi
cpu: 0.5
limits:
memory: 6Gi
cpu: 1
env:
- name: ES_JAVA_OPTS
value: "-Xms1g -Xmx1g"
count: 3
volumeClaimTemplates:
- metadata:
name: elasticsearch-data
spec:
accessModes:
- ReadWriteOnce
resources:
requests:
storage: 20Gi
storageClassName: standard
- name: data
config:
node.roles: ["data"]
node.store.allow_mmap: false
podTemplate:
metadata:
labels:
env: eck-poc-data
spec:
containers:
- name: elasticsearch-data
image: docker.elastic.co/elasticsearch/elasticsearch:7.11.0
# specify resource limits and requests
resources:
requests:
memory: 3Gi
cpu: 1
limits:
memory: 6Gi
cpu: 2
env:
- name: ES_JAVA_OPTS
value: "-Xms2g -Xmx2g"
count: 3
volumeClaimTemplates:
- metadata:
name: elasticsearch-data
spec:
accessModes:
- ReadWriteOnce
resources:
requests:
storage: 40Gi
storageClassName: balanced-rwo
I see two containers in e.g. a data
pod, one named name: elasticsearch-data
and one named plain elasticsearch
.
Is this the expected behavior?