Skip to content

Instantly share code, notes, and snippets.

@thbkrkr
Created April 14, 2023 21:20
Show Gist options
  • Save thbkrkr/8f26bfa62bd1b5f54bfef56e6687ed65 to your computer and use it in GitHub Desktop.
Save thbkrkr/8f26bfa62bd1b5f54bfef56e6687ed65 to your computer and use it in GitHub Desktop.
Configure an Elasticsearch Snapshot Repository with a StackConfigPolicy - #ECK
> k get es,scp
NAME HEALTH NODES VERSION PHASE AGE
elasticsearch/xyz green 1 8.7.0 Ready 6m
NAME READY PHASE AGE
stackconfigpolicy/snapshot-repo 1/1 Ready 5m
> eckurl default xyz /_snapshot
{"repo-snapshots":{"type":"s3","settings":{"readonly":"true","base_path":"snapshots/default-xyz"}}}
apiVersion: stackconfigpolicy.k8s.elastic.co/v1alpha1
kind: StackConfigPolicy
metadata:
name: snapshot-repo
spec:
elasticsearch:
snapshotRepositories:
repo-snapshots:
type: s3
settings:
base_path: "es-snapshots"
readonly: true
---
apiVersion: elasticsearch.k8s.elastic.co/v1
kind: Elasticsearch
metadata:
name: xyz
spec:
version: 8.7.0
nodeSets:
- name: default
count: 1
config:
node.store.allow_mmap: false
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment