I am using ECK operator to deploy ES cluster on Kubernetes. It is working fine, but now I want to have tolerations for the ES pods so that these pods get scheduled to correct Kubernetes nodes. I am using following yaml to deploy it.
apiVersion: elasticsearch.k8s.elastic.co/v1
kind: Elasticsearch
metadata:
name: elastic-data-factory
spec:
version: 7.14.0
nodeSets:
- name: master
count: 1
config:
node.master: true
node.data: false
node.ingest: false
podTemplate:
spec:
tolerations:
- key: "dedicated"
operator: "Equal"
value: "esdfnp"
effect: "NoSchedule"
containers:
- name: elasticsearch
resources:
requests:
memory: 8Gi
limits:
memory: 8Gi
- name: data
count: 3
config:
node.master: false
node.data: true
node.ingest: true
podTemplate:
spec:
tolerations:
- key: "dedicated"
operator: "Equal"
value: "esdfnp"
effect: "NoSchedule"
containers:
- name: elasticsearch
resources:
requests:
memory: 8Gi
limits:
memory: 8Gi
This creates stateful sets but does not have any tolerations on them, same with the resulting pods. I am not understanding what is the correct way to add tolerations.
PS: there are no errors when I apply above YAML.