Elasticsearch repository-azure kubernetes

Hello, someone has using Elasticsearch with repository-azure or Azure storage account for backup the snapshots? I'm trying to configure my kubernetes yml to install azure plugin before pod start but not success. All good with the deployment but when I try to create a azure repository using:
PUT _snapshot/backup-snapshots

{
  "type": "azure",
  "settings": {
    "account": "storage_account",
    "container": "backup-snapshots"
  }
}

I got a 400: BadRequest

thats my yml file:

    apiVersion: apps/v1

    kind: StatefulSet

    metadata:

      name: es-cluster

      namespace: kube-logging

    spec:

      serviceName: elasticsearch

      replicas: 1

      selector:

        matchLabels:

          app: elasticsearch

      template:

        metadata:

          labels:

            app: elasticsearch

        spec:

          containers:

            - name: elasticsearch

              image: docker.elastic.co/elasticsearch/elasticsearch:7.9.0

              resources:

                limits:

                  cpu: 2

                  memory: 2Gi

                requests:

                  cpu: 0.5

                  memory: 2Gi

              ports:

                - containerPort: 9200

                  name: rest

                  protocol: TCP

                - containerPort: 9300

                  name: inter-node

                  protocol: TCP

              env:

                - name: cluster.name

                  value: k8s-logs

                - name: node.name

                  valueFrom:

                    fieldRef:

                      fieldPath: metadata.name

                - name: discovery.seed_hosts

                  value: "es-cluster-0.elasticsearch"

                - name: cluster.initial_master_nodes

                  value: "es-cluster-0"

              volumeMounts:

                - name: data

                  mountPath: /usr/share/elasticsearch/data

                - name: config

                  mountPath: /usr/share/elasticsearch/config/elasticsearch.yml

                  subPath: elasticsearch.yml

          initContainers:

            - name: install-plugin

              image: docker.elastic.co/elasticsearch/elasticsearch:7.9.0

              command:

                - sh

                - -c

                - |

                  echo /usr/share/elasticsearch/bin/elasticsearch-plugin install --batch repository-azure

                  echo $AZURE_STORAGE_ACCOUNT_NAME | /usr/share/elasticsearch/bin/elasticsearch-keystore add --stdin --force azure.client.default.account

                  echo $AZURE_STORAGE_ACCOUNT_KEY | /usr/share/elasticsearch/bin/elasticsearch-keystore add --stdin --force azure.client.default.key

            - name: fix-permissions

              image: busybox

              command:

                ["sh", "-c", "chown -R 1000:1000 /usr/share/elasticsearch/data"]

              securityContext:

                privileged: true

              volumeMounts:

                - name: data

                  mountPath: /usr/share/elasticsearch/data

                - name: config

                  mountPath: /usr/share/elasticsearch/config/elasticsearch.yml

                  subPath: elasticsearch.yml

            - name: increase-vm-max-map

              image: busybox

              command: ["sysctl", "-w", "vm.max_map_count=262144"]

              securityContext:

                privileged: true

            - name: increase-fd-ulimit

              image: busybox

              command: ["sh", "-c", "ulimit -n 65536"]

              securityContext:

                privileged: true

              volumeMounts:

                - name: data

                  mountPath: /usr/share/elasticsearch/data

          volumes:

            - name: config

              configMap:

                name: elasticsearch-config

      volumeClaimTemplates:

        - metadata:

            name: data

            namespace: kube-logging

            labels:

              app: elasticsearch

          spec:

            accessModes: ["ReadWriteOnce"]

            storageClassName: default

            resources:

              requests:

                storage: 10Gi

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