This example stands up a simple Amazon EKS cluster (v1.19), then provides a procedure to install postgres and Kong Gateway Enterprise. It also makes use of Kong Ingress Controller to proxy requests in through a single AWS loadbalancer, which is best practice. Lastly, it enables BasicAuth RBAC for Kong Manager and Developer Portal.
- AWS Credentials (Access Key ID and Secret Access Key)
- AWS Key Pair for SSH
- Terraform CLI
- Route53 registered domain name
- Open
/tf-provision-eks/vpc.tfto search & replacesimongreenwith your own name. That way, all EKS objects will be tagged with your name making them easily searchable. Also, update the AWS region in this file to the region of your choice. - Via the CLI, login to AWS using
aws configure. - Via the CLI,
cd tf-provision-eksthen run the following Terraform commands to standup Amazon EKS:
terraform init
terraform apply
- Once terraform has stoodup EKS, setup
kubectlto point to your new EKS instance:
aws eks --region $(terraform output -raw region) update-kubeconfig --name $(terraform output -raw cluster_name)
kubectl get all
-
Copy your enterprise license file to a new file called
license. -
Run the installs script via a BASH shell:
./install.sh
-
Via the AWS web console, update your Route53. In my example, I create separate records for
simon-dev.kong-se.com,simon-portal.kong-se.comandsimon-gw.kong-se.comas the Record Name, Record type=A, and for Value I use "Alias to Netowrk Load Balancer" and set it to the hostname output from step 6.simon-devandsimon-portalpoint to the Ingress rule Address, andsimon-gwpoints directly to thekong-enterprise-kong-proxyservice address. -
Verify the Kong ingress rule in K9s or similar. The
Addressfield should be populated like so:
- Login to Kong Manager with:
- http://simon-dev.kong-se.com (u: kong_admin p: KongRul3z!)
-
Kong Dev Portal can be reached at
http://simon-portal.kong-se.comonce Dev Portal has been enabled via the Manager. -
API requests can be posted to
simon-gw.kong-se.com.
Once you know the Kong Admin API URL, you can execute the following deck commands:
# add route + service
deck sync -s add-route-service.yaml --kong-addr http://<admin API host>:8001
# add graphql rate limiting
deck sync -s add-rl-plugin.yaml --kong-addr http://<admin API host>:8001
# reset Kong to it's initial state
deck reset --kong-addr http://<admin API host>:8001
