# Error while upgrading cluster with helm

**URL:** <https://discuss.elastic.co/t/error-while-upgrading-cluster-with-helm/305562>\
**Category:** Elasticsearch\
**Tags:** docker\
**Created:** [May 25, 2022, 6:42am UTC](https://discuss.elastic.co/t/error-while-upgrading-cluster-with-helm/305562 "2022-05-25T06:42:17Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![akshay\_singh2](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/akshay_singh2/32/47046_2.png) [@akshay\_singh2](https://discuss.elastic.co/u/akshay_singh2)\
**Post date:** [May 25, 2022, 6:42am UTC](https://discuss.elastic.co/t/error-while-upgrading-cluster-with-helm/305562/1 "2022-05-25T06:42:17Z")

</div>

I'm trying to upgrade Elasticsearch from 7.17.3 to 8.1.0 with helm chart, but with new helm chart its giving me error.

```auto
Error: UPGRADE FAILED: template: elasticsearch/templates/statefulset.yaml:303:27: executing "elasticsearch/templates/statefulset.yaml" at <.Values.roles.master>: can't evaluate field master in type interface {}

```

Any lead and suggestion will be very helpful.

values.yaml file look like:

```auto
clusterName: "elasticsearch"
nodeGroup: "master"

masterService: ""

roles:
  - master
  - data
  - ingest
  - ml
  - remote_cluster_client
  - transform

replicas: 3
minimumMasterNodes: 2

esMajorVersion: ""

esJvmOptions: {}
extraEnvs: []

envFrom: []
secret:
  enabled: false
  password: "" # generated randomly if not defined

secretMounts: []

hostAliases: []

image: "docker.elastic.co/elasticsearch/elasticsearch"
imageTag: "8.1.0"
imagePullPolicy: "IfNotPresent"

podAnnotations: {}

labels: {}

esJavaOpts: "-Xmx4g -Xms4g"

resources:
  requests:
    cpu: "2000m"
    memory: "4Gi"
  limits:
    cpu: "4000m"
    memory: "6Gi"

networkHost: "0.0.0.0"

volumeClaimTemplate:
  accessModes: ["ReadWriteOnce"]
  storageClassName: storageclass
  resources:
    requests:
      storage: 50Gi

rbac:
  create: false
  serviceAccountAnnotations: {}
  serviceAccountName: ""
  automountToken: true

podSecurityPolicy:
  create: false
  name: ""
  spec:
    privileged: true
    fsGroup:
      rule: RunAsAny
    runAsUser:
      rule: RunAsAny
    seLinux:
      rule: RunAsAny
    supplementalGroups:
      rule: RunAsAny
    volumes:
      - secret
      - configMap
      - persistentVolumeClaim
      - emptyDir

persistence:
  enabled: true
  labels:
    # Add default labels for the volumeClaimTemplate of the StatefulSet
    enabled: false
  annotations: {}

priorityClassName: ""

antiAffinityTopologyKey: "kubernetes.io/hostname"

antiAffinity: "hard"

nodeAffinity: {}
podManagementPolicy: "Parallel"

enableServiceLinks: true

protocol: http
httpPort: 9200
transportPort: 9300

service:
  enabled: true
  labels: {}
  labelsHeadless: {}
  type: ClusterIP
  # Consider that all endpoints are considered "ready" even if the Pods themselves are not
  # https://kubernetes.io/docs/reference/kubernetes-api/service-resources/service-v1/#ServiceSpec
  publishNotReadyAddresses: false
  nodePort: ""
  annotations: {}
  httpPortName: http
  transportPortName: transport
  loadBalancerIP: ""
  loadBalancerSourceRanges: []
  externalTrafficPolicy: ""

updateStrategy: RollingUpdate
maxUnavailable: 1
podSecurityContext:
  fsGroup: 1000
  runAsUser: 1000

securityContext:
  capabilities:
    drop:
      - ALL
  # readOnlyRootFilesystem: true
  runAsNonRoot: true
  runAsUser: 1000

# How long to wait for elasticsearch to stop gracefully
terminationGracePeriod: 120

sysctlVmMaxMapCount: 262144

readinessProbe:
  failureThreshold: 3
  initialDelaySeconds: 10
  periodSeconds: 10
  successThreshold: 3

clusterHealthCheckParams: "wait_for_status=green&timeout=1s"

sysctlInitContainer:
  enabled: true

```

Thank you in Advance !!!

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [June 22, 2022, 6:42am UTC](https://discuss.elastic.co/t/error-while-upgrading-cluster-with-helm/305562/2 "2022-06-22T06:42:23Z")

</div>

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
