[openstack-helm-infra][elasticsearch]Error deploying chart in k8s cluster with local storage

Sanjay K isanjayk5 at gmail.com
Wed Apr 29 17:01:01 UTC 2020


Hey Roman,
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.
I am omitting other details from the dry run to minimize the textual info.
I can provide if you need them further.

thanks a lot for your help.

regards,
Sanjay

On Wed, Apr 29, 2020 at 7:39 PM Sanjay K <isanjayk5 at gmail.com> wrote:

> Hello Roman,
> 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.
>
> $ helm template elasticsearch local/elasticsearch --values
> values_overrides/local-storage.yaml -n openstack  --dry-run
> > elasticsearch-template.yaml
>
> $ kubectl apply -f elasticsearch-template.yaml
> 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
>
> stack at vik8s-cluster-vm1:~/openstack-helm-infra_stash/openstack-helm-infra/elasticsearch$
> kubectl apply -f elasticsearch-template.yaml --validate=false
> >>>successfully created all elasticsearch components and deployed the
> chart in k8s cluster
> output:
> serviceaccount/elasticsearch-elasticsearch-client created
> serviceaccount/elasticsearch-cluster-wait created
> serviceaccount/elasticsearch-elasticsearch-data created
> serviceaccount/elasticsearch-master created
> secret/elastic-curator-etc created
> secret/elasticsearch-etc created
> secret/elasticsearch-templates-etc created
> secret/elasticsearch-user-secrets created
> secret/elasticsearch-s3-user-creds created
> configmap/elastic-curator-bin created
> configmap/elasticsearch-bin created
>
> role.rbac.authorization.k8s.io/elasticsearch-openstack-elasticsearch-elasticsearch-client
> created
>
> role.rbac.authorization.k8s.io/elasticsearch-openstack-elasticsearch-cluster-wait
> created
>
> role.rbac.authorization.k8s.io/elasticsearch-openstack-elasticsearch-elasticsearch-data
> created
>
> rolebinding.rbac.authorization.k8s.io/elasticsearch-elasticsearch-elasticsearch-client
> created
>
> rolebinding.rbac.authorization.k8s.io/elasticsearch-elasticsearch-cluster-wait
> created
>
> rolebinding.rbac.authorization.k8s.io/elasticsearch-elasticsearch-elasticsearch-data
> created
> service/elasticsearch-data created
> service/elasticsearch-discovery created
> service/elasticsearch created
> service/elasticsearch-logging created
> deployment.apps/elasticsearch-client created
> statefulset.apps/elasticsearch-data created
> statefulset.apps/elasticsearch-master created
> job.batch/elasticsearch-cluster-wait created
> ingress.extensions/elasticsearch created
>
> $ kubectl get statefulset
> NAME                   READY   AGE
> elasticsearch-data     1/1     8m53s
> elasticsearch-master   3/3     8m53s
>
> 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.
>
> Any clue if I am missing something with the above way of chart deployment?
>
> Thank you very much for your pointers, it helped to bypass the original
> error.
>
> best regards,
> Sanjay
>
>
>
>
> On Fri, Apr 24, 2020 at 7:23 PM Sanjay K <isanjayk5 at gmail.com> wrote:
>
>> 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 -
>>
>> openstack-helm-infra/elasticsearch$ helm template elasticsearch
>> local/elasticsearch --values values_overrides/local-storage.yaml -n
>> openstack --validate --debug
>> install.go:158: [debug] Original chart version: ""
>> install.go:175: [debug] CHART PATH:
>> /opt/stack/.cache/helm/repository/elasticsearch-0.1.0.tgz
>>
>> 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
>> helm.go:75: [debug] error validating "": error validating data:
>> ValidationError(StatefulSet.spec): unknown field "strategy" in
>> io.k8s.api.apps.v1.StatefulSetSpec
>> helm.sh/helm/v3/pkg/kube.scrubValidationError
>>         /home/circleci/helm.sh/helm/pkg/kube/client.go:542
>> helm.sh/helm/v3/pkg/kube.(*Client).Build
>>         /home/circleci/helm.sh/helm/pkg/kube/client.go:149
>> helm.sh/helm/v3/pkg/action.(*Install).Run
>>         /home/circleci/helm.sh/helm/pkg/action/install.go:245
>> main.runInstall
>>         /home/circleci/helm.sh/helm/cmd/helm/install.go:223
>> main.newTemplateCmd.func1
>>         /home/circleci/helm.sh/helm/cmd/helm/template.go:66
>> github.com/spf13/cobra.(*Command).execute
>>         /go/pkg/mod/github.com/spf13/cobra at v0.0.5/command.go:826
>> github.com/spf13/cobra.(*Command).ExecuteC
>>         /go/pkg/mod/github.com/spf13/cobra at v0.0.5/command.go:914
>> github.com/spf13/cobra.(*Command).Execute
>>         /go/pkg/mod/github.com/spf13/cobra at v0.0.5/command.go:864
>> main.main
>>         /home/circleci/helm.sh/helm/cmd/helm/helm.go:74
>> runtime.main
>>         /usr/local/go/src/runtime/proc.go:203
>> runtime.goexit
>>         /usr/local/go/src/runtime/asm_amd64.s:1357
>> unable to build kubernetes objects from release manifest
>> helm.sh/helm/v3/pkg/action.(*Install).Run
>>         /home/circleci/helm.sh/helm/pkg/action/install.go:247
>> main.runInstall
>>         /home/circleci/helm.sh/helm/cmd/helm/install.go:223
>> main.newTemplateCmd.func1
>>         /home/circleci/helm.sh/helm/cmd/helm/template.go:66
>> github.com/spf13/cobra.(*Command).execute
>>         /go/pkg/mod/github.com/spf13/cobra at v0.0.5/command.go:826
>> github.com/spf13/cobra.(*Command).ExecuteC
>>         /go/pkg/mod/github.com/spf13/cobra at v0.0.5/command.go:914
>> github.com/spf13/cobra.(*Command).Execute
>>         /go/pkg/mod/github.com/spf13/cobra at v0.0.5/command.go:864
>> main.main
>>         /home/circleci/helm.sh/helm/cmd/helm/helm.go:74
>> runtime.main
>>         /usr/local/go/src/runtime/proc.go:203
>> runtime.goexit
>>         /usr/local/go/src/runtime/asm_amd64.s:1357
>>
>>
>> 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.
>>
>> /openstack-helm-infra/elasticsearch$ helm template elasticsearch
>> local/elasticsearch --values values_overrides/local-storage.yaml -n
>> openstack --wait --debug  --dry-run
>> install.go:158: [debug] Original chart version: ""
>> install.go:175: [debug] CHART PATH:
>> /opt/stack/.cache/helm/repository/elasticsearch-0.1.0.tgz
>>
>> ---
>> # Source: elasticsearch/templates/deployment-client.yaml
>> apiVersion: v1
>> kind: ServiceAccount
>> metadata:
>>   name: elasticsearch-elasticsearch-client
>>   namespace: openstack
>> ....
>> ....
>>
>> From the above, does it seem the issue is caused mismatch of tools
>> version used in my k8s cluster and helm charts?
>> 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.
>>
>> thanks and regards,
>> Sanjay
>>
>> On Tue, Apr 21, 2020 at 6:13 PM Roman Gorshunov <paye600 at gmail.com>
>> wrote:
>>
>>> Hello Sanjay,
>>>
>>> I have verified templates code for elasticsearch in
>>> openstack-helm-infra and relevant helm-toolkit code, and didn't find
>>> any visible problems. Deployments in Kubernetes v1.18 do support
>>> "strategy: ...".
>>> Could you try to render locally with "helm template ..." command and
>>> check the resulting deployments?
>>>
>>> Best regards,
>>> Roman Gorshunov
>>>
>>> On Tue, Apr 21, 2020 at 12:19 PM Sanjay K <isanjayk5 at gmail.com> wrote:
>>> >
>>> > Hi All,
>>> > Just forgot to mention my environment details if it throws any hints-
>>> > k8s - v1.18
>>> > helm - v3.1.2
>>> > openstack-helm-infra recent repo
>>> > docker - 19.03.7
>>> > VM OS- Ubuntu 16
>>> > openstack release - Stein
>>> >
>>> > thanks,
>>> > SanjayK
>>> >
>>> > On Mon, Apr 20, 2020 at 4:42 PM Sanjay K <isanjayk5 at gmail.com> wrote:
>>> >>
>>> >> Hello everyone,
>>> >> 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.
>>> >>
>>> >> However I face issues while deploying elasticsearch helm chart using
>>> the below command :
>>> >> $ helm install elasticsearch local/elasticsearch --values
>>> values_overrides/local-storage.yaml  -n openstack
>>> >> 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
>>> >>
>>> >> Can anyone point me if I missing anything?
>>> >> 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?
>>> >>
>>> >> Thanks for your pointers and suggestions.
>>> >> '
>>> >> best regards,
>>> >> SanjayK
>>>
>>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstack.org/pipermail/openstack-discuss/attachments/20200429/a4f5166f/attachment-0001.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: elasticsearch-statefulset.yml
Type: application/octet-stream
Size: 16337 bytes
Desc: not available
URL: <http://lists.openstack.org/pipermail/openstack-discuss/attachments/20200429/a4f5166f/attachment-0001.obj>


More information about the openstack-discuss mailing list