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.
- Google Cloud SDK configured on your laptop/workstation.
- kubectl. At the moment, ECK requires version 1.16+. See ECK requirements.
- jq (Optional). Command-line JSON processor.
- kubernetic (Optional). Kubernetes Desktop Client.
To run the following examples, follow these steps to deploy a GKE cluster and install ECK.
- Basic Elastic Stack Deployment
- Deploy the Elastic Stack and a dedicated Monitoring Cluster.
- TODO - Hot/Warm/Cold deployment in a regional cluster.
- TODO - Spring petclinic with APM. Based on elastic/spring-petclinic.
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}