Table of Contents

  1. Kubernetes Ingress Controller for Kong
  2. Kong via Google Cloud Platform Marketplace
  3. Kong via Helm or Minikube
  4. Kong via Manifest Files
  5. Additional Steps for Kong Enterprise Trial Users

Kubernetes Ingress Controller for Kong

Install Kong or Kong Enterprise using the official Kubernetes Ingress Controller.

Learn more via the README . To get up and running quickly, follow the Minikube and Minishift tutorials.

The Kubernetes Ingress Controller for Kong launch announcement is on the Kong Blog.

For questions and discussion, please visit Kong Nation. For bug reports, please open a new issue on GitHub.

Kong via Google Cloud Platform Marketplace

Perhaps the fastest way to try Kong on Kubernetes is via the Google Cloud Platform Marketplace and Google Kubernetes Engine - plus, with Google Cloud Platform’s Free Tier and credit, it will likely be free for you to get started.

  1. Visit https://console.cloud.google.com/marketplace/details/kong/kong
  2. Click “Configure” and follow the on-screen prompts
  3. Refer to https://github.com/Kong/google-marketplace-kong-app/blob/master/README.md for important details regarding exposing the Admin API so that you can configure Kong.

If you were only experimenting, consider deleting your Google Cloud resources once you’ve completed your experiment to avoid on-going Google Cloud usage charges.

Kong via Helm or Minikube

An easy way to deploy Kong on Kubernetes is via Helm.

Kong can also be deployed on minikube - please follow the README and use the manifest files provided in minikube directory.

Kong via Manifest Files

Kong, or the trial version of Kong Enterprise, can be provisioned on a Kubernetes cluster via the manifest files provided in the repo.

1. Initial setup

Download or clone the following repo:

$ git clone git@github.com:Kong/kong-dist-kubernetes.git
$ cd kong-dist-kubernetes

Skip to step 3 if you have already provisioned a cluster and registered it with Kubernetes.

2. Deploy a cluster

Google Kubernetes Engine (GKE)

You need gcloud and kubectl command-line tools installed and set up to run deployment commands. Also make sure your Google Cloud account has STATIC_ADDRESSES available for the external access of Kong services.

Using the cluster.yaml file from this repo, deploy a GKE cluster. Provide the following information before deploying:

  1. Desired cluster name
  2. Zone in which to run the cluster
  3. A basicauth username and password for authenticating the access to the cluster
$ gcloud deployment-manager deployments \
    create cluster --config cluster.yaml

Azure Kubernetes Cluster (AKS)

You need az command-line tools installed and set up to run deployment commands.

  1. Create a Resource Group

     $ az group create --name myAKSCluster --location eastus
    
  2. Install kubectl

    If you already have kubectl installed, you can skip this step.

     $ az aks install-cli
    
  3. Configure kubectl

     $ az aks get-credentials --resource-group myAKSCluster --name myAKSCluster
    

3. Deploy a datastore

Before deploying Kong, you need to provision a Cassandra or PostgreSQL pod.

For Cassandra, use the cassandra.yaml file from this repo to deploy a Cassandra Service and a StatefulSet in the cluster.

$ kubectl create -f cassandra.yaml

For PostgreSQL, use the postgres.yaml file from the kong-dist-kubernetes repo to deploy a PostgreSQL Service and a ReplicationController in the cluster:

$ kubectl create -f postgres.yaml

Kong Enterprise trial users should complete the steps in the Additional Steps for Kong Enterprise Trial Users section below before proceeding.

4. Prepare database

Using the kong_migration_<postgres|cassandra>.yaml file, run the migration job:

$ kubectl create -f kong_migration_<postgres|cassandra>.yaml

Once the job completes, you can remove the pod by running following command:

$ kubectl delete -f kong_migration_<postgres|cassandra>.yaml

5. Deploy Kong

Using the kong_<postgres|cassandra>.yaml file from this repo, deploy Kong admin, proxy services, and a Deployment controller to the cluster:

$ kubectl create -f kong_<postgres|cassandra>.yaml

6. Verify your deployments

You can now see the resources that have been deployed using kubectl:

$ kubectl get all

Once the EXTERNAL_IP is available for Kong Proxy and Admin services, you can test Kong by making the following requests:

$ curl <kong-admin-ip-address>:8001
$ curl https://<admin-ssl-ip-address>:8444
$ curl <kong-proxy-ip-address>:8000
$ curl https://<kong-proxy-ssl-ip-address>:8443

7. Get Started with Kong

Quickly learn how to use Kong with the 5-minute Quickstart.

Additional Steps for Kong Enterprise Trial Users

  1. Publish a Kong Enterprise Docker image to your container registry

    Because the Kong Enterprise image is not available on the public Docker container registry, you must publish it to a private repository for use with Kubernetes. While any private repository will work, this example uses the Google Cloud Platform Container Registry, which automatically integrates with the Google Cloud Platform examples in the other steps.

    In the steps below, replace <image ID> with ID associated with your loaded image in docker images output. Replace <project ID> with your Google Cloud Platform project ID.

     $ docker load -i /tmp/kong-docker-enterprise-edition.tar.gz
     $ docker images
     $ docker tag <image ID> gcr.io/<project ID>/kong-ee
     $ gcloud docker -- push gcr.io/demo-cs-lab/kong-ee:latest
    
  2. Add your Kong Enterprise License File

    Edit kong_trial_postgres.yaml and kong_trial_migration_postgres.yaml to replace YOUR_LICENSE_HERE with your Kong Enterprise License File string - it should look like:

     - name: KONG_LICENSE_DATA
     value: '{"license":{"signature":"alongstringofcharacters","payload":{"customer":"Test Company","license_creation_date":"2018-03-06","product_subscription":"Kong Only","admin_seats":"5","support_plan":"Premier","license_expiration_date":"2018-06-04","license_key":"anotherstringofcharacters"},"version":1}}'
    
  3. Use the Kong Enterprise image

    Edit kong_trial_postgres.yaml and kong_trial_migration_postgres.yaml and replace image: kong with image: gcr.io/<project ID>/kong-ee, using the same project ID as above.

  4. Deploy Kong Enterprise

    Continue from step 4 in the Kong or Kong Enterprise via Manifest Files instruction above, using the kong_trial_* YAML files in the Kong Enterprise Trial directory. Once Kong Enterprise is running, you should be able to access the Kong Admin GUI at <kong-admin-ip-address>:8002 or https://<kong-ssl-admin-ip-address>:8445.

Get Updates!

Follow Up:

Get future release notes emailed to you.


Having Trouble? We're Here to Help!