nodeSelector does not work(?)
szymonpk opened this issue · 7 comments
I am not sure if I have messed something or it is not fully supported. Config which I am trying
apiVersion: enterprises.upmc.com/v1
kind: ElasticsearchCluster
metadata:
name: es-cluster
spec:
kibana:
enabled: false
image: docker.elastic.co/kibana/kibana-oss:6.1.3
cerebro:
enabled: false
image: upmcenterprises/cerebro:0.6.8
elastic-search-image: upmcenterprises/docker-elasticsearch-kubernetes:6.1.3_1
client-node-replicas: 1
master-node-replicas: 1
data-node-replicas: 1
network-host: 0.0.0.0
zones: []
data-volume-size: 20Gi
java-options: "-Xms512m -Xmx512m"
snapshot:
scheduler-enabled: false
bucket-name: elasticsnapshots99
cron-schedule: "@every 2m"
image: upmcenterprises/elasticsearch-cron:0.0.4
storage:
storage-class: nfs
resources:
requests:
memory: 512Mi
cpu: 100m
limits:
memory: 1024Mi
cpu: 100m
nodeSelector:
type: muse
ES is installed with helm
helm install --name es0 es-operator/elasticsearch --namespace logging --values elasticsearch/values.yaml --tls
Pods are up, but I got empty result from:
$ kubectl get po es-data-es0-cluster-default-0 -n logging -o yaml | grep nodeSelector
And pods/containers are running on the wrong nodes.
This looks like a bug @szymonpk, that field is not implemented anywhere to pass through to the resources created.
@szymonpk, Im working on a PR that will implement nodeSelectors / Taints and Tolerations.
Thanks, much appreciated.
Just a FYI, there is not much about how this works.
I am trying to use nodeSelector, and I cannot make it work.
My current cluster definition is this
apiVersion: enterprises.upmc.com/v1
kind: ElasticsearchCluster
metadata:
name: es-cluster
namespace: observability
spec:
kibana:
image: docker.elastic.co/kibana/kibana-oss:6.1.3
cerebro:
image: upmcenterprises/cerebro:0.6.8
nodeSelector:
cloud.google.com/gke-nodepool: "jaeger-nodepool"
elastic-search-image: upmcenterprises/docker-elasticsearch-kubernetes:6.1.3_0
client-node-replicas: 2
master-node-replicas: 2
data-node-replicas: 3
network-host: 0.0.0.0
data-volume-size: 10Gi
java-options: "-Xms512m -Xmx512m"
snapshot:
scheduler-enabled: false
bucket-name: elasticsnapshots99
cron-schedule: "@every 2m"
image: upmcenterprises/elasticsearch-cron:0.0.4
storage:
storage-class-provisioner: kubernetes.io/gce-pd
zones:
- europe-west4-c
resources:
requests:
memory: 512Mi
cpu: 500m
limits:
memory: 1024Mi
cpu: '1'
I never see the nodeselector on the actual pods, it does not work for the tolerations or affinity as well
this is how I am installing the operator
helm repo add es-operator https://raw.githubusercontent.com/upmc-enterprises/elasticsearch-operator/master/charts/
helm install --name elasticsearch-operator es-operator/elasticsearch-operator --set rbac.enabled=True --namespace observability
then I run this YAML from above using kubectl create -f
, I do see everything come up but node selectors are ignore by the operator.
I tried several variations and positions of the node selector in the CRD, but couldn't make it work
@cfontes Make sure that you are using the latest version of the operator. The helm chart is outdated.
You can just pass --set image.tag=0.3.0
to above helm install command.
@stevesloka I think we can close this issue, node tolerations are applied in my test cluster.