Skip to content

Latest commit

 

History

History
56 lines (38 loc) · 2.39 KB

README.md

File metadata and controls

56 lines (38 loc) · 2.39 KB

Deploying the Elastic Stack with ECK on GKE

This project contains instructions on how to install ECK on Google's managed kubernetes (GKE) and test a few of its capabilities.

It's intended as a step by step guide to further investigate ECK capabilities on GKE, not for production.

Pre-requisites

Deploy a GKE cluster and install ECK

To run the following examples, follow these steps to deploy a GKE cluster and install ECK.

Examples

  1. Basic Elastic Stack Deployment
  2. Deploy the Elastic Stack and a dedicated Monitoring Cluster.
  3. TODO - Hot/Warm/Cold deployment in a regional cluster.
  4. TODO - Spring petclinic with APM. Based on elastic/spring-petclinic.

Clean-up

When we are done with the testing, it is recommended to follow the uninstall process for each example, to liberate k8s resources like Load Balancers or Persistent Volumes Claims.

Once this is done for each example, we can remove the operator.

kubectl delete -f https://download.elastic.co/downloads/eck/1.6.0/all-in-one.yaml

And delete the GKE cluster. Login to Google Cloud Console and remove the cluster you created.

Alternatively, use the script:

#!/bin/bash
## Deletes a GKE cluster

# Cluster attributes (GCP project, zone, name and sizing)
gcp_project="immas-k8s-project"
gcp_zone="europe-west3-c"
gke_cluster_name="imma-gke"

## Destroy cluster
if [[ $(gcloud container clusters list 2> /dev/null --project ${gcp_project} | grep ${gke_cluster_name} | wc -l) -gt 0 ]]
then gcloud container clusters delete ${gke_cluster_name} --project ${gcp_project} --zone=${gcp_zone} --quiet;
else echo "cluster ${gke_cluster_name} not found"
fi

## Remove kubectl context
kubectl config unset contexts.${gke_cluster_name}