Skip to content

Install Kong

Overview

Kong is an Ingress Controller for use on k8s clusters. Features include Ingress routing, low latency, API management which allows users to use various plugins. These plugins allow users to take advantage of additional features which provide monitoring, TLS termination, transformations, and Deep Packet Inspection. In addition users can take advantage of health checking, load-balancing, and authentication functionality.


Assumptions

  • A Kubernetes cluster running the Kong controller. This cluster can be either provisioned or imported into a Project in your Org.
  • The Managed Prometheus add-on components installed in the rafay-infra namespace by the Controller on the Kubernetes cluster. See Managed Prometheus for more information.

Install Kong

Use Kong's Helm chart to install the Kong Controller using a Workload.

Create a namespace

To allow Managed Prometheus to collect metrics data from Kong (or any other application), add the following Annotations.

# Additional annotation to be added to Kong pods,
#so it will be scraped by Managed Prometheus
# Ref doc: https://docs.rafay.co/workloads/k8s_yaml/#pod-metrics
podAnnotations:
prometheus.io/scrape: "true"
prometheus.io/path: /metrics
prometheus.io/port: "8100"
#Uncomment below section for baremetal based k8s cluster where
#loadbalancer is not available
# proxy:
# # Enable creating a Kubernetes service for the proxy
# enabled: true
# type: NodePort

Integrate the repository

For the Controller to be able to connect and download any Helm chart, it needs to be integrated with Repositories in the Console.

  1. In the Console, select the project with the Kong controller cluster.
  2. Select Integrations > Repositories.
  3. Click New Repository.
  4. Add a name and description to the repository.

    New Repository

  5. Make sure Helm is selected for Type.

  6. Click Create.
  7. Edit the new repository.
  8. For Endpoint, add https://charts.konghq.com to add the Kong Helm chart endpoint.

    Add Kong Helm Chart

  9. Make sure Internet is selected for Reachability.

  10. Click Save.

Install using Add-Ons

After Repository integration, install the Kong Helm chart with the kong-custom-values.yaml file.

  1. In the Kong controller cluster, select Applications > Add-Ons.
  2. Select New Add-On > Create New Add-On from Catalog.
  3. Search for and select Kong.
  4. Click Create Add-On, add kong for the name, then click Create.
  5. Add the following details to the Add-On:

    • Version Name: v1
    • Description: kong logging
  6. For the Values Files, click Override from git repository, then select the Kong Git repository from the override list.

    Add Kong Repository

    • A custom values.yaml file can be used instead of the repository. See Kong Values File for information on where to get the file.
  7. Click SAVE CHANGES.

Kong Values File

The Kong Helm Chart contains a values.yaml file that can be used with the Add-On.

  1. Go to https://github.com/Kong/charts.
  2. Download the helm chart (Code > Download Zip).
  3. Unzip the file and use the values.yaml file (charts/charts/kong).