Deploy the tyk-dev-portal helm chart on AWS EKS
TypeScriptTo deploy the
tyk-dev-portal
Helm chart on an Amazon EKS cluster, we'll need to follow these steps:- Set up an EKS cluster.
- Configure the Kubernetes provider to connect to the EKS cluster.
- Use the Helm Chart resource to deploy
tyk-dev-portal
.
For this setup, we'll use Pulumi's EKS package, which simplifies EKS cluster creation, and the Kubernetes package for deploying the Helm chart.
Here's a TypeScript program that defines these resources:
import * as eks from "@pulumi/eks"; import * as k8s from "@pulumi/kubernetes"; import * as pulumi from "@pulumi/pulumi"; // Step 1: Create an EKS Cluster const cluster = new eks.Cluster("tyk-dev-portal-cluster", { // Desired settings for the EKS cluster; you may adjust these parameters as per your requirements. instanceType: "t2.medium", desiredCapacity: 2, minSize: 1, maxSize: 3, storageClasses: "gp2", deployDashboard: false, }); // Step 2: Configure the Kubernetes provider to connect to the created EKS cluster const k8sProvider = new k8s.Provider("k8s-provider", { kubeconfig: cluster.kubeconfig.apply(JSON.stringify), }); // Step 3: Deploy the `tyk-dev-portal` Helm chart to the EKS cluster const tykDevPortalChart = new k8s.helm.v3.Chart("tyk-dev-portal", { chart: "tyk-dev-portal", version: "<chart version>", // replace with the desired chart version fetchOpts: { repo: "https://helm.tyk.io/public/helm/charts/", // Helm repository for Tyk }, // Define values for the helm chart as needed. values: { // Your Tyk Dev Portal specific values go here }, }, { provider: k8sProvider }); // Export the cluster's kubeconfig and Tyk Dev Portal endpoint export const kubeconfig = cluster.kubeconfig; export const devPortalEndpoint = tykDevPortalChart.getResourceProperty("v1/Service", "tyk-dev-portal", "status").apply(s => s.loadBalancer.ingress[0].hostname);
This program creates an EKS cluster, configures Pulumi to use this cluster for deploying Kubernetes resources, and then deploys the
tyk-dev-portal
Helm chart onto the cluster. ThedevPortalEndpoint
export will provide you with the access URL to Tyk Developer Portal once it's deployed.Please replace
"<chart version>"
with the specific version of thetyk-dev-portal
Helm chart you wish to install. You can find the available chart versions and further configuration options in the Tyk Helm Chart repository.You also need to fill in the
values
object with the configurations specific to yourtyk-dev-portal
setup, which may include things like domain configuration or resource sizing.Lastly, remember to configure your AWS credentials and Pulumi stack settings. With your AWS account configured correctly, you can use Pulumi to deploy this stack using the Pulumi CLI. Just remember to run
pulumi up
to create the resources on AWS.