Right way to specify podAffinity/nodeSelector for kibana sub-chart from bitnami elasticsearch chart

6/26/2020

I have just started using Bitnami Elasticssearch chart to deploy my elasticsearch cluster on AWS EKS. I have been able to deploy it successfully using the values-production.yaml file.

However, there are two issues that I'd like to address:

  1. Specify node selector/pod affinity for metrics pod: I see that the templates/metrics-deploy.yaml doesn't handle both, node selector or pod affinity. I want my metrics container to run on one of the Elasticsearch master nodes. Does that mean I have to modify the metrics-deploy.yaml file?

  2. Specify pod affinity for kibana sub-chart: Ideally, kibana pod should be co-located with the coordinating/client node. I thought that would be the default behavior but it isn't so. How do I specify pod affinity for the kibana sub-chart from inside my customized values-production.yaml file (for Elasticsearch). I suppose I can create my own helm chart from bitnami but that sounds like a lot of work for a simple ask.

Thanks.

-- Nikhil Utane
bitnami
kubernetes
kubernetes-helm

2 Answers

6/26/2020

Found this: https://helm.sh/docs/chart_template_guide/subcharts_and_globals/ to specify values for sub-chart

-- Nikhil Utane
Source: StackOverflow

6/26/2020
  1. Helm has recently introduced functionality to overwrite un-templated values. It is called post rendering and allows you to integrate third party tools like kustomize to overwrite yaml files. An example can be found here.
  2. To overwrite templated values from a sub-chart from the command line, simply prefix them with the name of the sub-chart, so in case of the node affinity setting, this would be: --set kibana.affinity
-- Fritz Duchardt
Source: StackOverflow