Skip to content

Instantly share code, notes, and snippets.

@thbkrkr
Last active November 18, 2023 01:17
Show Gist options
  • Save thbkrkr/f1b997ca4adf1c7f00a834fa715ec7b0 to your computer and use it in GitHub Desktop.
Save thbkrkr/f1b997ca4adf1c7f00a834fa715ec7b0 to your computer and use it in GitHub Desktop.
Elasticsearch on GKE using ECK
#!/bin/bash -eu
# install kubectl: https://kubernetes.io/docs/tasks/tools
# install gcloud: https://cloud.google.com/sdk/docs/install
# authenticate: gcloud auth login
# gcloud container clusters create c0 --region europe-west1
kubectl create -f https://download.elastic.co/downloads/eck/2.10.0/crds.yaml
kubectl apply -f https://download.elastic.co/downloads/eck/2.10.0/operator.yaml
cat <<EOF | kubectl apply -f -
apiVersion: elasticsearch.k8s.elastic.co/v1
kind: Elasticsearch
metadata:
name: hulk
spec:
version: 8.11.1
http:
service:
spec:
type: LoadBalancer
nodeSets:
- name: default
count: 1
config:
node.store.allow_mmap: false
EOF
watch -n1 kubectl get elastic,po
@thbkrkr
Copy link
Author

thbkrkr commented Nov 18, 2023

curl -s https://gist.githubusercontent.com/thbkrkr/f1b997ca4adf1c7f00a834fa715ec7b0/raw/74722276969bb76595ea9992c07416358b775ce8/es-eck-gke-quickstart.sh | sh

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment