<div dir="ltr">Hey Roman,<div>Attaching the statefulset details which are generated during  template --dry-run. Please let me know if you need any other info from the dry run.</div><div>I am omitting other details from the dry run to minimize the textual info. I can provide if you need them further.</div><div><br></div><div>thanks a lot for your help.</div><div><br></div><div>regards,</div><div>Sanjay</div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Wed, Apr 29, 2020 at 7:39 PM Sanjay K <<a href="mailto:isanjayk5@gmail.com">isanjayk5@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr">Hello Roman,<div>As suggested I ran 'helm template' without --validate flag and generated the template. I used the generated template to apply to my cluster which successfully created the necessary elasticsearch components and deployed the services in my cluster.</div><div><br></div><div>$ helm template elasticsearch local/elasticsearch --values values_overrides/local-storage.yaml -n openstack  --dry-run > elasticsearch-template.yaml<br></div><div><br></div><div>$ kubectl apply -f elasticsearch-template.yaml<br>error: error validating "elasticsearch-template.yaml": error validating data: ValidationError(StatefulSet.spec): unknown field "strategy" in io.k8s.api.apps.v1.StatefulSetSpec; if you choose to ignore these errors, turn validation off with --validate=false<br><br></div><div>stack@vik8s-cluster-vm1:~/openstack-helm-infra_stash/openstack-helm-infra/elasticsearch$ kubectl apply -f elasticsearch-template.yaml --validate=false<br></div><div>>>>successfully created all elasticsearch components and deployed the chart in k8s cluster</div><div>output:</div><div>serviceaccount/elasticsearch-elasticsearch-client created<br>serviceaccount/elasticsearch-cluster-wait created<br>serviceaccount/elasticsearch-elasticsearch-data created<br>serviceaccount/elasticsearch-master created<br>secret/elastic-curator-etc created<br>secret/elasticsearch-etc created<br>secret/elasticsearch-templates-etc created<br>secret/elasticsearch-user-secrets created<br>secret/elasticsearch-s3-user-creds created<br>configmap/elastic-curator-bin created<br>configmap/elasticsearch-bin created<br><a href="http://role.rbac.authorization.k8s.io/elasticsearch-openstack-elasticsearch-elasticsearch-client" target="_blank">role.rbac.authorization.k8s.io/elasticsearch-openstack-elasticsearch-elasticsearch-client</a> created<br><a href="http://role.rbac.authorization.k8s.io/elasticsearch-openstack-elasticsearch-cluster-wait" target="_blank">role.rbac.authorization.k8s.io/elasticsearch-openstack-elasticsearch-cluster-wait</a> created<br><a href="http://role.rbac.authorization.k8s.io/elasticsearch-openstack-elasticsearch-elasticsearch-data" target="_blank">role.rbac.authorization.k8s.io/elasticsearch-openstack-elasticsearch-elasticsearch-data</a> created<br><a href="http://rolebinding.rbac.authorization.k8s.io/elasticsearch-elasticsearch-elasticsearch-client" target="_blank">rolebinding.rbac.authorization.k8s.io/elasticsearch-elasticsearch-elasticsearch-client</a> created<br><a href="http://rolebinding.rbac.authorization.k8s.io/elasticsearch-elasticsearch-cluster-wait" target="_blank">rolebinding.rbac.authorization.k8s.io/elasticsearch-elasticsearch-cluster-wait</a> created<br><a href="http://rolebinding.rbac.authorization.k8s.io/elasticsearch-elasticsearch-elasticsearch-data" target="_blank">rolebinding.rbac.authorization.k8s.io/elasticsearch-elasticsearch-elasticsearch-data</a> created<br>service/elasticsearch-data created<br>service/elasticsearch-discovery created<br>service/elasticsearch created<br>service/elasticsearch-logging created<br>deployment.apps/elasticsearch-client created<br>statefulset.apps/elasticsearch-data created<br>statefulset.apps/elasticsearch-master created<br>job.batch/elasticsearch-cluster-wait created<br>ingress.extensions/elasticsearch created<br></div><div><br></div><div>$ kubectl get statefulset<br>NAME                   READY   AGE<br>elasticsearch-data     1/1     8m53s<br>elasticsearch-master   3/3     8m53s<br></div><div><br></div><div>For me the flag "

--validate=false" did the trick to avoid the error. Whether this can be applied in elasticsearch's values.yaml file so that the chart can be deployed without the error.</div><div><br></div><div>Any clue if I am missing something with the above way of chart deployment?</div><div><br></div><div>Thank you very much for your pointers, it helped to bypass the original error.</div><div><br></div><div>best regards,</div><div>Sanjay</div><div><br></div><div><br></div><div><br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Fri, Apr 24, 2020 at 7:23 PM Sanjay K <<a href="mailto:isanjayk5@gmail.com" target="_blank">isanjayk5@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr">Thank you for your reply. I forgot to mention that before deploying elasticsearch helm chart, I also deployed local-storage helm chart to create 3 PVs which might be used by elasticsearch chart. When I run helm template with debug and other parameters, it show below errors -<div><br>openstack-helm-infra/elasticsearch$ helm template elasticsearch local/elasticsearch --values values_overrides/local-storage.yaml -n openstack --validate --debug<br>install.go:158: [debug] Original chart version: ""<br>install.go:175: [debug] CHART PATH: /opt/stack/.cache/helm/repository/elasticsearch-0.1.0.tgz<br><br>Error: unable to build kubernetes objects from release manifest: error validating "": error validating data: ValidationError(StatefulSet.spec): unknown field "strategy" in io.k8s.api.apps.v1.StatefulSetSpec<br>helm.go:75: [debug] error validating "": error validating data: ValidationError(StatefulSet.spec): unknown field "strategy" in io.k8s.api.apps.v1.StatefulSetSpec<br><a href="http://helm.sh/helm/v3/pkg/kube.scrubValidationError" target="_blank">helm.sh/helm/v3/pkg/kube.scrubValidationError</a><br>        /home/circleci/<a href="http://helm.sh/helm/pkg/kube/client.go:542" target="_blank">helm.sh/helm/pkg/kube/client.go:542</a><br><a href="http://helm.sh/helm/v3/pkg/kube.(*Client).Build" target="_blank">helm.sh/helm/v3/pkg/kube.(*Client).Build</a><br>        /home/circleci/<a href="http://helm.sh/helm/pkg/kube/client.go:149" target="_blank">helm.sh/helm/pkg/kube/client.go:149</a><br><a href="http://helm.sh/helm/v3/pkg/action.(*Install).Run" target="_blank">helm.sh/helm/v3/pkg/action.(*Install).Run</a><br>        /home/circleci/<a href="http://helm.sh/helm/pkg/action/install.go:245" target="_blank">helm.sh/helm/pkg/action/install.go:245</a><br>main.runInstall<br>        /home/circleci/<a href="http://helm.sh/helm/cmd/helm/install.go:223" target="_blank">helm.sh/helm/cmd/helm/install.go:223</a><br>main.newTemplateCmd.func1<br>        /home/circleci/<a href="http://helm.sh/helm/cmd/helm/template.go:66" target="_blank">helm.sh/helm/cmd/helm/template.go:66</a><br><a href="http://github.com/spf13/cobra.(*Command).execute" target="_blank">github.com/spf13/cobra.(*Command).execute</a><br>        /go/pkg/mod/<a href="http://github.com/spf13/cobra@v0.0.5/command.go:826" target="_blank">github.com/spf13/cobra@v0.0.5/command.go:826</a><br><a href="http://github.com/spf13/cobra.(*Command).ExecuteC" target="_blank">github.com/spf13/cobra.(*Command).ExecuteC</a><br>        /go/pkg/mod/<a href="http://github.com/spf13/cobra@v0.0.5/command.go:914" target="_blank">github.com/spf13/cobra@v0.0.5/command.go:914</a><br><a href="http://github.com/spf13/cobra.(*Command).Execute" target="_blank">github.com/spf13/cobra.(*Command).Execute</a><br>        /go/pkg/mod/<a href="http://github.com/spf13/cobra@v0.0.5/command.go:864" target="_blank">github.com/spf13/cobra@v0.0.5/command.go:864</a><br>main.main<br>        /home/circleci/<a href="http://helm.sh/helm/cmd/helm/helm.go:74" target="_blank">helm.sh/helm/cmd/helm/helm.go:74</a><br>runtime.main<br>        /usr/local/go/src/runtime/proc.go:203<br>runtime.goexit<br>        /usr/local/go/src/runtime/asm_amd64.s:1357<br>unable to build kubernetes objects from release manifest<br><a href="http://helm.sh/helm/v3/pkg/action.(*Install).Run" target="_blank">helm.sh/helm/v3/pkg/action.(*Install).Run</a><br>        /home/circleci/<a href="http://helm.sh/helm/pkg/action/install.go:247" target="_blank">helm.sh/helm/pkg/action/install.go:247</a><br>main.runInstall<br>        /home/circleci/<a href="http://helm.sh/helm/cmd/helm/install.go:223" target="_blank">helm.sh/helm/cmd/helm/install.go:223</a><br>main.newTemplateCmd.func1<br>        /home/circleci/<a href="http://helm.sh/helm/cmd/helm/template.go:66" target="_blank">helm.sh/helm/cmd/helm/template.go:66</a><br><a href="http://github.com/spf13/cobra.(*Command).execute" target="_blank">github.com/spf13/cobra.(*Command).execute</a><br>        /go/pkg/mod/<a href="http://github.com/spf13/cobra@v0.0.5/command.go:826" target="_blank">github.com/spf13/cobra@v0.0.5/command.go:826</a><br><a href="http://github.com/spf13/cobra.(*Command).ExecuteC" target="_blank">github.com/spf13/cobra.(*Command).ExecuteC</a><br>        /go/pkg/mod/<a href="http://github.com/spf13/cobra@v0.0.5/command.go:914" target="_blank">github.com/spf13/cobra@v0.0.5/command.go:914</a><br><a href="http://github.com/spf13/cobra.(*Command).Execute" target="_blank">github.com/spf13/cobra.(*Command).Execute</a><br>        /go/pkg/mod/<a href="http://github.com/spf13/cobra@v0.0.5/command.go:864" target="_blank">github.com/spf13/cobra@v0.0.5/command.go:864</a><br>main.main<br>        /home/circleci/<a href="http://helm.sh/helm/cmd/helm/helm.go:74" target="_blank">helm.sh/helm/cmd/helm/helm.go:74</a><br>runtime.main<br>        /usr/local/go/src/runtime/proc.go:203<br>runtime.goexit<br>        /usr/local/go/src/runtime/asm_amd64.s:1357<br><div><br></div><div><br></div><div>However with below cmdline options, helm template generates the deployment info below without any issue..but actual helm install cmd fails to deploy the chart.</div><div><br></div><div>/openstack-helm-infra/elasticsearch$ helm template elasticsearch local/elasticsearch --values values_overrides/local-storage.yaml -n openstack --wait --debug  --dry-run<br>install.go:158: [debug] Original chart version: ""<br>install.go:175: [debug] CHART PATH: /opt/stack/.cache/helm/repository/elasticsearch-0.1.0.tgz<br><br>---<br># Source: elasticsearch/templates/deployment-client.yaml<br>apiVersion: v1<br>kind: ServiceAccount<br>metadata:<br>  name: elasticsearch-elasticsearch-client<br>  namespace: openstack<br></div><div>....</div><div>....</div><div><br></div><div>From the above, does it seem the issue is caused mismatch of tools version used in my k8s cluster and helm charts?</div><div>I even tried with lesser version of k8s (v1.17), helm(v3.0.3) and docker(19.03.8) in my cluster, the issue is same with elasticsearch chart deploy.</div><div><br></div><div>thanks and regards,</div><div>Sanjay</div></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Tue, Apr 21, 2020 at 6:13 PM Roman Gorshunov <<a href="mailto:paye600@gmail.com" target="_blank">paye600@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Hello Sanjay,<br>
<br>
I have verified templates code for elasticsearch in<br>
openstack-helm-infra and relevant helm-toolkit code, and didn't find<br>
any visible problems. Deployments in Kubernetes v1.18 do support<br>
"strategy: ...".<br>
Could you try to render locally with "helm template ..." command and<br>
check the resulting deployments?<br>
<br>
Best regards,<br>
Roman Gorshunov<br>
<br>
On Tue, Apr 21, 2020 at 12:19 PM Sanjay K <<a href="mailto:isanjayk5@gmail.com" target="_blank">isanjayk5@gmail.com</a>> wrote:<br>
><br>
> Hi All,<br>
> Just forgot to mention my environment details if it throws any hints-<br>
> k8s - v1.18<br>
> helm - v3.1.2<br>
> openstack-helm-infra recent repo<br>
> docker - 19.03.7<br>
> VM OS- Ubuntu 16<br>
> openstack release - Stein<br>
><br>
> thanks,<br>
> SanjayK<br>
><br>
> On Mon, Apr 20, 2020 at 4:42 PM Sanjay K <<a href="mailto:isanjayk5@gmail.com" target="_blank">isanjayk5@gmail.com</a>> wrote:<br>
>><br>
>> Hello everyone,<br>
>> I have been trying to deploy elasticsearch helm chart in my k8s cluster consisting of 4 nodes (1 k8s master, 1 controller and 2 computes) after deploying fluentbit and fluentd helm charts which are deployed with success. I have plan to make the EFK (Elasticsearch-Fluentd-Kibana) stack running in my k8s cluster setup for logs management.<br>
>><br>
>> However I face issues while deploying elasticsearch helm chart using the below command :<br>
>> $ helm install elasticsearch local/elasticsearch --values values_overrides/local-storage.yaml  -n openstack<br>
>> Error: unable to build kubernetes objects from release manifest: error validating "": error validating data: ValidationError(StatefulSet.spec): unknown field "strategy" in io.k8s.api.apps.v1.StatefulSetSpec<br>
>><br>
>> Can anyone point me if I missing anything?<br>
>> What are the prerequisites before deploying elasticsearch chart which intended to use local storage/pv in my case avoiding the default S3 storage as per the chart?<br>
>><br>
>> Thanks for your pointers and suggestions.<br>
>> '<br>
>> best regards,<br>
>> SanjayK<br>
</blockquote></div>
</blockquote></div>
</blockquote></div>