Created
November 18, 2022 10:50
-
-
Save rujmah/0e0256bf0277119402da68311bab783d to your computer and use it in GitHub Desktop.
Revisions
-
rujmah created this gist
Nov 18, 2022 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,27 @@ #!/bin/env bash set -e RED="\e[31m" GREEN="\e[32m" YELLOW="\e[33m" ENDCOLOR="\e[0m" CLUSTER_NAME=$1 [[ -z "$CLUSTER_NAME" ]] && { echo "${RED}Please specify a CLUSTER NAME: ${YELLOW} . ./setup-kong.sh CLUSTER_NAME ${ENDCOLOR}"; exit 1; } echo -e "${GREEN}>>> Setting up Kong dev Env on Cluster ${YELLOW}$CLUSTER_NAME \r\n${ENDCOLOR}" aws eks update-kubeconfig --name $CLUSTER_NAME export KONG_PROXY=$(kubectl get -o jsonpath="{.status.loadBalancer.ingress[0].hostname}" service -n kong kong-data-plane-kong-proxy) export KONG_ADMIN=$(kubectl get -o jsonpath="{.status.loadBalancer.ingress[0].hostname}" service -n kong kong-control-plane-kong-admin) export KONG_ADMIN_URL=http://$KONG_ADMIN:8001 export KONG_PROXY_URL=http://$KONG_PROXY export DECK_KONG_ADDR=$KONG_ADMIN_URL echo -e "${GREEN}\nthe following env variables were set:\n ${YELLOW}" env | ack KONG echo -e "${GREEN}\nend\n${ENDCOLOR}"