Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions recipes/eck-operator.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
apiVersion: v1
kind: kbrew
app:
repository:
name: elastic
url: https://helm.elastic.co
type: helm
namespace: "elastic-system"
sha256:
version: 1.6.0
52 changes: 52 additions & 0 deletions recipes/elasticsearch-stack.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
apiVersion: v1
kind: kbrew
app:
pre_install:
- apps:
- eck-operator
repository:
name: elastic
url: https://raw.githubusercontent.com/elastic/cloud-on-k8s/1.6/config/recipes/logstash/logstash.yaml
type: raw
namespace: "elastic-system"
sha256:
version: 1.6.0
post_install:
- steps:
- |
# Wait for ElasticSearch to be ready
echo "Waiting for ElasticSearch cluster to be ready"
retry=0
while true;
do
currentState=$(kubectl -n elastic-system get elasticsearches elasticsearch -o jsonpath='{.status.health}')
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"elasticsearches" - typo?

if [ ! -z "${currentState}" ] && [ "${currentState}" = "green" ]; then break; fi
if [ "${retry}" = 60 ]; then echo "timed out while waiting for Elasticsearch cluster to be ready"; exit 1; fi
sleep 10
retry=$((retry+1))
done
- |
# Wait for Kibana to be ready
echo "Waiting for Kibana cluster to be ready"
retry=0
while true;
do
currentState=$(kubectl -n elastic-system get kibana kibana -o jsonpath='{.status.health}')
if [ ! -z "${currentState}" ] && [ "${currentState}" = "green" ]; then break; fi
if [ "${retry}" = 60 ]; then echo "timed out while waiting for Kibana to be ready"; exit 1; fi
sleep 10
retry=$((retry+1))
done
- |
# Print console info
echo "NOTE:"
echo "Port forward with following command to access elasticsearch console - "
echo "kubectl port-forward service/elasticsearch-es-http 9200 -n elastic-system"
echo "ElasticSearch User: elastic"
echo "ElasticSearch Password: $(kubectl -n elastic-system get secret elasticsearch-es-elastic-user -o go-template='{{.data.elastic | base64decode}}')"
echo "Request localhost - curl -u "elastic:$PASSWORD" -k 'https://localhost:9200'"
echo "Access Kibana UI"
echo "Port forward with following command to access Kibana console - "
echo "kubectl port-forward service/kibana-kb-http 5601 -n elastic-system'"
echo "Open https://localhost:5601 in your browser. Your browser will show a warning because the self-signed certificate configured by default is not verified by a known certificate authority and not trusted by your browser. You can temporarily acknowledge the warning for the purposes of this quick start but it is highly recommended that you configure valid certificates for any production deployments."
echo "Use the Elasticseach credentials printed above to login to the Kibana."
16 changes: 16 additions & 0 deletions recipes/elasticsearch.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
apiVersion: v1
kind: kbrew
app:
args:
replicas: 1
repository:
name: elastic
url: https://helm.elastic.co
type: helm
namespace: ""
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we set some default namespace?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

okay sure.

sha256:
version: 7.13.0
post_install:
- apps:
- kibana
- logstash
10 changes: 10 additions & 0 deletions recipes/kibana.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
apiVersion: v1
kind: kbrew
app:
repository:
name: elastic
url: https://helm.elastic.co
type: helm
namespace: ""
sha256:
version: 7.13.0
10 changes: 10 additions & 0 deletions recipes/logstash.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
apiVersion: v1
kind: kbrew
app:
repository:
name: elastic
url: https://helm.elastic.co
type: helm
namespace: ""
sha256:
version: 7.13.0