CLUSTER_NAME=<cluster_name>
ZONE_NAME=<zone_name>
PROJECT_NAME=<project_name>
MACHINE_TYPE=e2-standard-4
gcloud container clusters create $CLUSTER_NAME --project $PROJECT_NAME --zone $ZONE_NAME --labels=label_a=xxxxx,label_b=xxxxxx --machine-type $MACHINE_TYPE
gcloud container clusters get-credentials $CLUSTER_NAMsE --zone $ZONE_NAME --project $PROJECT_NAME
kubectl create clusterrolebinding \
cluster-admin-binding \
--clusterrole=cluster-admin \
--user=$(gcloud auth list --filter=status:ACTIVE --format="value(account)")
kubectl create -f https://download.elastic.co/downloads/eck/2.4.0/crds.yaml
kubectl apply -f https://download.elastic.co/downloads/eck/2.4.0/operator.yaml
- please check newest custom resouce definition on official ECK docs. https://www.elastic.co/guide/en/cloud-on-k8s/current/k8s-deploy-eck.html
kubectl apply -f quickstart-eck-with-lb.yaml
kubectl get service kibana-quickstart-kb-http -o yaml
kubectl get statefulset elastic-operator --namespace elastic-system -o yaml
PASSWORD=$(kubectl get secret quickstart-es-elastic-user -o=jsonpath='{.data.elastic}' | base64 --decode)
ES_EXTERNAL_IP=$(kubectl get svc quickstart-es-http -o=jsonpath='{.status.loadBalancer.ingress[0].ip}')
curl -u "elastic:$PASSWORD" -k "https://$ES_EXTERNAL_IP:9200"
PASSWORD=$(kubectl get secret quickstart-es-elastic-user -o=jsonpath='{.data.elastic}' -n default | base64 --decode)
KI_EXTERNAL_IP=$(kubectl get svc kibana-quickstart-kb-http -o=jsonpath='{.status.loadBalancer.ingress[0].ip}' -n default)
curl -u "elastic:${PASSWORD}" -k "https://${KI_EXTERNAL_IP}:5601/api/status" | jq .
kubectl delete -f quickstart-eck-with-lb.yaml
kubectl delete -f https://download.elastic.co/downloads/eck/2.4.0/operator.yaml
kubectl delete -f https://download.elastic.co/downloads/eck/2.4.0/crds.yaml