xco-sk / eck-custom-resources

Kubernetes operator for Indices, Index Templates, Roles, Users and other Elasticsearch and Kibana related resources.
Apache License 2.0
36 stars 8 forks source link

add compatibility for 7.1x Elastic #41

Closed MrTolerant closed 1 year ago

MrTolerant commented 2 years ago

Add posibility to create SnapshotRepository for Elasticsearch version: 7.17.4

Now when i try to create SnapshotRepository Helm release values:

  values:
    fullnameOverride: es-logging-custom-resources-operator
    elasticsearch:
      enabled: true
      url: http://es-logging-es-http:9200/
      certificate:
        secretName: es-logging-es-http-certs-public
        certificateKey: ca.crt
      authentication:
        usernamePasswordSecret:
          secretName: es-logging-es-elastic-user
          userName: elastic
    kibana:
      enabled: false
apiVersion: es.eck.github.com/v1alpha1
kind: SnapshotRepository
metadata:
  name: es-audit-azure-backup
  namespace: es-audit
spec:
  body: |
    {
      "type": "azure",
      "settings":
      {
        "container": "es-audit",
        "base_path" : "/"
      }
    }

i got error:

1.6666965462157245e+09  ERROR   controller.snapshotrepository   Reconciler error    {"reconciler group": "es.eck.github.com", "reconciler kind": "SnapshotRepository", "name": "es-iam-azure-backup", "namespace": "es-iam", "error": "error(status: 500, response: [500 Internal Server Error] {\"error\":{\"root_cause\":[{\"type\":\"settings_exception\",\"reason\":\"Unable to find client with name [default]\"}],\"type\":\"repository_verification_exception\",\"reason\":\"[es-iam-azure-backup] path  is not accessible on master node\",\"caused_by\":{\"type\":\"settings_exception\",\"reason\":\"Unable to find client with name [default]\"}},\"status\":500})"}
xco-sk commented 2 years ago

Hi @MrTolerant,

the error from the ES seems like there is an issue accessing the Azure Blob storage from your ES nodes and because of that the creation of the snapshot repository fails. There are 2 things to verify:

  1. According to documentation you should configure the azure client credentials. Please confirm this was done beforehand (most likely in ES docker image startup script after K8s mounts the token/key from Secret)
  2. Try to create a snapshot repository manually by running the following curl:
    curl -k -u elastic -X PUT "http://es-logging-es-http:9200/_snapshot/es-audit-azure-backup?pretty" -H 'Content-Type: application/json' -d'
    {
    "type": "azure",
    "settings": {
    "container": "es-audit",
    "base_path": "/"
    }
    }
xco-sk commented 1 year ago

@MrTolerant any update on this?

xco-sk commented 1 year ago

Closing this issue, if the problem persists, please reopen or create a new one.