# Azure snapshot missing required setting: azure.client.default.account

**URL:** <https://discuss.elastic.co/t/azure-snapshot-missing-required-setting-azure-client-default-account/200308>\
**Category:** Elasticsearch\
**Created:** [September 19, 2019, 8:25pm UTC](https://discuss.elastic.co/t/azure-snapshot-missing-required-setting-azure-client-default-account/200308 "2019-09-19T20:25:38Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Marcus\_Simonsen](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/marcus_simonsen/32/54552_2.png) [@Marcus\_Simonsen](https://discuss.elastic.co/u/Marcus_Simonsen)\
**Post date:** [September 19, 2019, 8:25pm UTC](https://discuss.elastic.co/t/azure-snapshot-missing-required-setting-azure-client-default-account/200308/1 "2019-09-19T20:25:39Z")

</div>

Hello.  
I'm trying to provision azure snapshot repository as described here (not gcp as in example).  
[https://www.elastic.co/guide/en/cloud-on-k8s/current/k8s-snapshot.html](https://www.elastic.co/guide/en/cloud-on-k8s/current/k8s-snapshot.html)

I have created the kubernetes secrets and verified that they are in the keystore.

Here is my manifest below. When I add the azure applicable config settings, I get an exception:  
"stacktrace": ["org.elasticsearch.bootstrap.StartupException: java.lang.IllegalArgumentException: missing required setting [azure.client.default.account] for setting [azure.client.default.endpoint\_suffix]",

I think it's just I don't understand how the secureSettings are getting applied, because when I add both secure settings names, only one gets applied - the last one.

```
---
apiVersion: elasticsearch.k8s.elastic.co/v1alpha1
kind: Elasticsearch
metadata:
  name: elasticsearch-sample
spec:
  version: 7.2.0
  secureSettings:
    secretName: azure.client.default.account
    secretName: azure.client.default.key

  http:
    tls:
      certificate:
        secretName: ss-cert
  
  nodes:
  - config:
      # most Elasticsearch configuration parameters are possible to set, e.g:
      node.attr.attr_name: attr_value
      node.master: true
      node.data: true
      node.ingest: true
      node.ml: true
      # azure.client.default.timeout: 10s
      # azure.client.default.max_retries: 7
      # azure.client.default.endpoint_suffix: core.windows.net
      # azure.client.secondary.timeout: 30s
      # azure.client.default.max_retries: 5

    podTemplate:
      metadata:
        labels:
          owner: msimonsen
      spec:
        initContainers:
        - name: install-plugins
          command:
          - sh
          - -c
          - |
            bin/elasticsearch-plugin install --batch repository-azure
        # - name: config-es-keystore
        # command:
        # - sh
        # - -c
        # - echo "didit" |
        # bin/elasticsearch-keystore add azure.client.default.account --stdin repository-azure  
            
        containers:
        - name: elasticsearch
          volumeMounts:
          - name: elasticsearch-keystore
            mountPath: /usr/share/elasticsearch/blaa
          # specify resource limits and requests
          resources:
            limits:
              memory: 8Gi
              cpu: 2
          env:
          - name: ES_JAVA_OPTS
            value: "-Xms4g -Xmx4g"
        volumes:
          - name: elasticsearch-keystore
            configMap:
              name: elasticsearch-keystore
    nodeCount: 3
    volumeClaimTemplates:
    - metadata:
        name: elasticsearch-data # note: elasticsearch-data must be the name of the Elasticsearch volume
      spec:
        accessModes:
        - ReadWriteOnce
        resources:
          requests:
            storage: 100Gi
```

---

<div class="post-metadata">

**Author:** ![Marcus\_Simonsen](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/marcus_simonsen/32/54552_2.png) [@Marcus\_Simonsen](https://discuss.elastic.co/u/Marcus_Simonsen)\
**Post date:** [September 20, 2019, 1:28pm UTC](https://discuss.elastic.co/t/azure-snapshot-missing-required-setting-azure-client-default-account/200308/2 "2019-09-20T13:28:05Z")

</div>

I solved my own issue 🙂  
I added secrets as a name/value pair:

```
apiVersion: v1
kind: Secret
metadata:
  name: az-secret
type: Opaque
data:
  azure.client.default.account: yyy-base64Encoded
  azure.client.default.key: xxx-base64

```

However I'm running into issues about the encoding now:

"stacktrace": ["org.elasticsearch.transport.RemoteTransportException: [elasticsearch-sample-es-x5gfctkt4p][10.244.1.30:9300][cluster:admin/repository/put]",  
"Caused by: org.elasticsearch.common.settings.SettingsException: Invalid azure client settings with name [default]",  
...  
"Caused by: org.elasticsearch.common.io.stream.NotSerializableExceptionWrapper: invalid\_key\_exception: Storage Key is not a valid base64 encoded string.",

---

<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:** [October 18, 2019, 1:28pm UTC](https://discuss.elastic.co/t/azure-snapshot-missing-required-setting-azure-client-default-account/200308/3 "2019-10-18T13:28:35Z")

</div>

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