Kong can easily be povisioned to Google Cloud using the following steps:
-
Initial setup:
You would need gcloud and kubectl command-line tools installed and set up to run deployment commands.
Download or clone the repo
$ git clone [email protected]:Mashape/kong-dist-google-cloud.git $ cd kong-dist-google-cloud
-
Deploy a cluster:
Using
cluster.yaml
, deploy a GKE cluster to use for deploying the solution later. Fill in the following information before deploying:- desired cluster name
- zone in which to run the cluster
- basicauth username and password for authenticating access to the cluster
When ready, deploy with the following command:
$ gcloud deployment-manager deployments create cluster --config cluster.yaml
-
Deploy a Kong supported Database
Using
cassandra.yaml
deploy a CassandraService
and aReplicationController
to the GKE cluster created in the last step. Update following properties if needed.- the cluster type created for the GKE cluster deployed previously
- the Cassandra image
- the CQL and Thrift port for Cassandra
When ready, deploy with the following command:
$ gcloud deployment-manager deployments create cassandra --config cassandra.yaml
-
Deploying Kong on the cluster
Using
kong.yaml
, deploy a KongService
and aReplicationController
to the GKE cluster created in the last step. Update following properties if needed.- the cluster type created for the GKE cluster deployed previously
- the Kong image (for different version)
- the Admin and Proxy port for Kong containers
- the Admin and Proxy allowed CIDR for Kong
When ready, deploy with the following command:
$ gcloud deployment-manager deployments create kong --config kong.yaml
-
Verifying deployment
Be sure your
kubectl
command-line tool is set up to communicate with the cluster you have deployed:$ gcloud container clusters get-credentials :cluster-name --zone <zone>
Now you can see the resources that have been deployed using
kubectl
:$ kubectl get rc $ kubectl get pods $ kubectl get services
Once the
EXTERNAL_IP
is available for Kong Proxy and Admin services, you can test Kong:$ curl <admin-ip-address>:8001 $ curl <proxy-ip-address>:8000
-
Using Kong:
Quickly learn how to use Kong with the 5-minute Quickstart.
When deploying into a Kubernetes cluster with Deployment Manager, it is
important to be aware that deleting ReplicationController
Kubernetes objects
does not delete its underlying pods, and it is your responisibility to
manage the destruction of these resources when deleting or updating a
ReplicationController
in your configuration.
Support, Demo, Training, API Certifications and Consulting available at http://getkong.org/enterprise.