The Kong AI/MCP Gateway deployment process can be divided into two steps:
- Pod Identity configuration
- Kong Control Plane and Data Plane deployment using the Kubernetes Kong Operator
Pod Identity configuration
In this first step, we configure EKS Pod Identity describing which AWS Services the Data Plane Pods should be allowed to access. In our case, we need to consume Amazon Bedrock and AWS Secrets Manager.
IAM Policy
Pod Identity relies on IAM policies to check which AWS Services can be consumed. Our policy should allow access to AWS Bedrock actions so the Data Plane will be able to send requests to Bedrock APIs, more precisely, Converse and ConverseStream APIs. The Converse API requires permission to the InvokeModel action as ConverseStream needs access to InvokeModelWithResponseStream.
Also, we're going to use AWS Secrets Manager to store our Private Key and Digital Certificate pair, which the Konnect Control Plane and Data Plane used to communicate.
Considering all this, let's create the IAM policy with the following request:
Pod Identity Association
Pod Identity takes a Kubernetes Service Account to manage the permissions. So create the Kubernetes namespace for the Kong Data Plane deployment and a simple service account inside of it.
Now we're ready to create the Pod Identity Association. We use the same eksctl command to do it:
The command above is responsible for:
- IAM Role creation based on the IAM Policy we previously defined
- Associating the IAM Role to the existing Kubernetes Service Account
You can check the Pod Identity Association with:
Check the IAM Role and Policies attached with:
Kong Operator and Control Plane/Data Plane deployment
The Data Plane deployment comprises the following steps:
- Konnect subscription
- Kong Operator installation
- Konnect Control Plane creation
- Konnect Data Plane deployment
Konnect subscription
This fundamental step is required to get access to Konnect. Click on the Registration link and present your credentials. Or, if you already have a Konnect subscription, log in to it.
Any Konnect subscription has a "default" Control Plane defined. You can proceed using it or optionally create a new one. The following instructions are based on a new Control Plane.
Kong Operator installation
The Konnect Control Plane and Data Plane creation and deployments are totally managed by the Kong Operator (KO) which is fully compliant with the Kubernetes Operator standards. First, we need to install it. Check the documentation to learn more.
You can check the Operator’s log with:
Konnect Control Plane creation
In order to start using the Kong Operator, you need to issue a Konnect Personal Access Token (PAT) or a System Access Token (SAT). To generate your PAT, go to Konnect UI, click on your initials in the upper right corner of the Konnect home page, then select "Personal Access Tokens." Click on "+ Generate Token," name your PAT, set its expiration time, and be sure to copy and save it as an environment variable also named as PAT. Konnect won’t display your PAT again.
Now, you can create your Control Plane with the first Kong Operator declaration. The first CRD tells the Operator which Konnect region you’re using, and what token (PAT or SAT) to use to authenticate.
The second CRD creates the new Control Plane:
Konnect Data Plane deployment
Finally, in the last step we will deploy the Data Plane. The following KonnectExtension CRD allows you to define your Konnect Control Plane details. The DataPlane CRD actually creates the Konnect Data Plane, attaching it to the Control Plane.
Note the DataPlane declaration:
- Adds the service annotation to request a public NLB for the Data Plane.
- Uses the Kubernetes Service Account that has been used to create the Pod Identity Association, so the Data Plane can have access to both Amazon Bedrock and Secrets Manager.
Checking the Data Plane
Use the Load Balancer created during the deployment:
You should get a response like this:
Now we can define the Kong Objects necessary to expose and control Bedrock, including Kong Gateway Service, Routes, and Plugins.