elasticsearch-operator icon indicating copy to clipboard operation
elasticsearch-operator copied to clipboard

Setup of azure snapshot

Open vakaobr opened this issue 5 years ago • 0 comments

Hello there,

I noticed the docker-elasticsearch-kubernetes doens't have the repository-azure plugin installed by default, so I've generated a image with that and replaced my deployment with that.

I'm trying to enable azure snapshots, but still getting a error related to it.

My es cluster deployment file is as follows:

apiVersion: enterprises.upmc.com/v1
kind: ElasticsearchCluster
metadata:
  annotations:
  name: es-mycluster
  namespace: logging
spec:
  cerebro:
    image: upmcenterprises/cerebro:0.7.2
  client-node-replicas: 1
  data-node-replicas: 2
  data-volume-size: 155Gi
  elastic-search-image: my.private.register:81/myrepo/docker-elasticsearch-kubernetes:6.1.3
  java-options: -Xms512m -Xmx512m
  kibana:
    image: docker.elastic.co/kibana/kibana-oss:6.1.3
  master-node-replicas: 1
  master-volume-size: 15Gi
  network-host: 0.0.0.0
  resources:
    limits:
      cpu: "1.25"
    requests:
      cpu: "1"
      memory: 1Gi
  snapshot:
    scheduler-enabled: true
    type: azure
    authentication:
      username: bucketsnapshots
      password: mystorageaccountpassword
    bucket-name: bucketsnapshots
    cron-schedule: '@every 60m'
    image: komljen/elasticsearch-cron:0.0.6
  storage:
    storage-class: managed-premium
  strategy:
    type: Recreate
  zones: []

And when the create-repository job runs, I got that on log:

2019/09/10 11:46:04 [elasticsearch-cron] is up and running! 2019-09-10 11:46:04.59529803 +0000 UTC m=+0.000808404
time="2019-09-10T11:46:04Z" level=info msg="About to create Snapshot Repository..."
time="2019-09-10T11:46:04Z" level=info msg="PUT BODY: { \"type\": \"azure\", \"settings\": { \"bucket\": \"bucketsnapshots\", \"server_side_encryption\": \"false\" } }"
time="2019-09-10T11:46:04Z" level=info msg="Using basic Auth Credentials bucketsnapshots"
time="2019-09-10T11:46:04Z" level=error msg="Error creating snapshot repository [httpstatus: 500][url: https://elasticsearch-es.logging.svc.cluster.local:9200/_snapshot/bucketsnapshots][body: {\"error\":{\"root_cause\":[{\"type\":\"repository_exception\",\"reason\":\"[bucketsnapshots] failed to create repository\"}],\"type\":\"repository_exception\",\"reason\":\"[bucketsnapshots] failed to create repository\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"If you want to use an azure repository, you need to define a client configuration.\"}},\"status\":500}] "

Looks like I'm clearing missing (or misunderstanding) some aspect of configuration. I've read (again) the Documentation but its not very clear about usage with azure.

Could you guys please advise, or pointing me to some direction ?

vakaobr avatar Sep 10 '19 11:09 vakaobr