How to use Azure Storage plugin in ECK for Snapshot

Hi All,

I have to configure snapshot in ECK Deployment. Elasticsearch documentation has given example for Google cloud. Please can anyone list the steps for that.

I tried this -
Created a file azure.client.default.credentials_file

"azure.client.default.account": "ddddadsdasascs",
"azure.client.default.key": "csvtbdv"

Create secret -

kubectl create secret generic azure-snapshot-credentials --from-file=azure.client.default.credentials_file -n dev

and updated the file with this -

  - secretName: "azure-snapshot-credentials"

But I see the pod started crashing with following error -

java.lang.IllegalArgumentException: unknown secure setting [azure.client.default.credentials_file] please check that any required plugins are installed, or check the breaking changes documentation for removed settings

I am pretty sure, i am doing something wrong. Please can someone help me on this.


You probably want to install the azure repository plugin.
Please look at ECK plugins documentation.

Hi Sebastien @sebgl, I am using custom build image with plugin. Please let me know anything else need to be done.

FROM ${repository_url}/elasticsearch:7.7.0
RUN bin/elasticsearch-plugin install --batch https://<repository_url>/


Hi Sebgl,

I am able to proceed further via correcting some information. I created a secret with following yaml file.

apiVersion: v1
kind: Secret
  name: azure-snapshot-scret
type: Opaque
  azure.client.default.account: <base-64 account name>
  azure.client.default.key: <base-64 key>

Now when i am running repository test following error is coming

{"type": "server", "timestamp": "2020-06-22T15:32:19,515Z", "level": "WARN", "component": "r.suppressed", "": "emptydir-els", "": "emptydir-els-es-master-0", "message": "path: /_snapshot/test/_verify, params: {repository=test}", "cluster.uuid": "hZne8eJ5SgOeGeslyLvJkw", "": "0c1AOl99Ta-w-6fE7ivrzA" ,  
"stacktrace": ["org.elasticsearch.common.settings.SettingsException: Invalid azure client settings with name [default]", 
"at ~[?:?]", 
"at ~[?:?]", 
"at ~[?:?]", 
"at ~[?:?]", 
"at ~[?:?]", 
"at org.elasticsearch.repositories.blobstore.BlobStoreRepository.startVerification( ~[elasticsearch-7.7.0.jar:7.7.0]", 
"at org.elasticsearch.repositories.RepositoriesService$3.doRun( ~[elasticsearch-7.7.0.jar:7.7.0]", 
"at org.elasticsearch.common.util.concurrent.ThreadContext$ContextPreservingAbstractRunnable.doRun( [elasticsearch-7.7.0.jar:7.7.0]", 
"at [elasticsearch-7.7.0.jar:7.7.0]", 
"at java.util.concurrent.ThreadPoolExecutor.runWorker( [?:?]", 
"at java.util.concurrent.ThreadPoolExecutor$ [?:?]", 
"at [?:?]", 
"Caused by: Storage Key is not a valid base64 encoded string.", 
"at ~[?:?]", 
"at ~[?:?]", 
"at ~[?:?]", 
"at ~[?:?]", 
"at ~[?:?]", 
"at ~[?:?]", 
"... 11 more"] } 

I am able to fix it now. Values for Account name and Key details after encryption were not proper. Thanks

İ did everything accordingly but still failing. I also read a Medium post about this still no result.

Probably in some cases I noticed the base64 of key was having a "/n". Make sure proper base64 is being generated.