PermalinkInstalling Kong Enterprise on Kubernetes
PermalinkIntroduction
Kong Enterprise on Kubernetes supports all Kong Enterprise plugins and features.
This installation topic walks you through a database-backed deployment on Kubernetes. For a basic DB-less deployment with the Kong Ingress Controller, see Installing Kong for Kubernetes Enterprise.
You can use kubectl
or OpenShift oc
to configure Kong Enterprise on Kubernetes, then deploy it using Helm.
PermalinkDeployment Options
The following instructions assume that you are deploying Kong Gateway in classic embedded mode.
If you would like to run Kong Gateway in Hybrid mode, the instructions in this topic will walk you though setting up a Control Plane instance. Afterward, you will need to bring up additional Kong instances for the Data Planes, and perform further configuration steps. See Hybrid Mode setup documentation for details.
PermalinkPrerequisites
Before starting installation, be sure you have the following:
- Kubernetes cluster with load balancer: Kong is compatible with all distributions of Kubernetes. You can use a Minikube, GKE, or OpenShift cluster.
- kubectl or oc access: You should have
kubectl
oroc
(if working with OpenShift) installed and configured to communicate to your Kubernetes cluster. -
Helm installed.
- You have signed up for a paid Enterprise subscription and received a
license.json
file from Kong.
PermalinkStep 1. Provision a namespace
To create the license secret, first provision the kong
namespace:
PermalinkStep 2. Set Up Kong Enterprise license
Running Kong Enterprise on Kubernetes requires a valid license. See prerequisites for more information.
Save the license file temporarily to disk with filename license
(no file extension) and execute the following:
- There is no
.json
extension in the--from-file
parameter. -n kong
specifies the namespace in which you are deploying Kong for Kubernetes Enterprise. If you are deploying in a different namespace, change this value.
PermalinkStep 3. Set up Helm
- Add the Kong charts repository:
$ helm repo add kong https://charts.konghq.com
- Update Helm:
$ helm repo update
PermalinkStep 4. Seed the Super Admin password
PermalinkStep 5. Prepare the sessions plugin for Kong Manager and Dev Portal
In the following steps, replace <your-password>
with a secure password.
PermalinkStep 6. Prepare Kong’s configuration file
-
Create a
values.yaml
file for Helm based on the template in the Kong charts repository. This file contains all the possible parameters for your Kong deployment.You can also base your configuration on a sample Kong Enterprise
values.yaml
file. For example, this values file enables most Kong Enterprise features. -
Minimally, for setting up Kong Enterprise on Kubernetes, you will need to set the following parameters:
Parameter Value enterprise.enabled
true
enterprise.portal.enabled
(Optional) Set to true
to enable the Kong Developer Portal.enterprise.rbac.enabled
(Optional) Set to true
to enable RBAC. Requires seeding the super admin password; see above.env.database
"postgres"
or"cassandra"
env.pg_host
(If using Postgres) Set to host of the Postgres server (only if postgresql.enabled
isfalse
).env.pg_port
(If using Postgres) Set to port of the Postgres server (only if postgresql.enabled
isfalse
).env.pg_user
(If using Postgres) Set to the Postgres user (default kong
). Whenpostgresql.enabled
istrue
, this has to matchpostgresql.postgresqlUsername
.env.pg_password
(If using Postgres) Set to the Postgres user’s password. When postgresql.enabled
istrue
, this has to matchpostgresql.postgresqlPassword
.env.pg_database
(If using Postgres) Set to the Postgres database name (default kong
). Whenpostgresql.enabled
istrue
, this has to matchpostgresql.postgresqlDatabase
.env.password.valueFrom.secretKeyRef.name
Name of secret that holds the super admin password. In the example above, this is set to kong-enterprise-superuser-password
.env.password.valueFrom.secretKeyRef.key
The type of secret key used for authentication. If you followed the default settings in the example above, this is password
.image.repository
The Docker repository. In this case, kong/kong-gateway
.image.tag
The Docker image tag you want to pull down, e.g. "2.1.4.6-alpine"
.admin.enabled
Set to true
to enable the Admin API, which is required for the Kong Manager.ingressController.enabled
Set to true
if you want to use the Kong Ingress Controller, orfalse
if you don’t want to install it.postgresql.enabled
Set to true
to deploy a Postgres database along with Kong.postgresql.postgresqlUsername
Set Postgres user (e.g. kong
).postgresql.postgresqlPassword
Set Postgres user’s password. postgresql.postgresqlDatabase
Set Postgres database name (e.g. kong
). -
In the
Kong Enterprise
section, enable Kong Manager (manager
) and Kong Dev Portal (portal
).For example:
manager: enabled: true type: LoadBalancer http: enabled: true servicePort: 8002 tls: enabled: true servicePort: 8445 portal: enabled: true type: LoadBalancer http: enabled: true servicePort: 8003 tls: enabled: true servicePort: 8446
-
Fill in the rest of the parameters as appropriate for your implementation. Use the comments in the sample file to guide you, and see the documentation on Kong Enterprise parameters for more details.
PermalinkStep 7. Deploy Kong Enterprise on Kubernetes
The steps in this section show you how to install Kong Enterprise on Kubernetes using Helm.
PermalinkStep 8. Finalize Configuration and Verify Installation
PermalinkNext steps…
See Using Kong for Kubernetes Enterprise for information about concepts, how-to guides, reference guides, and using plugins.