1. Deploy the tekton helm chart on AWS EKS


    To deploy the Tekton Helm chart on an AWS EKS cluster using Pulumi, we'll need to complete several steps:

    1. Create an EKS cluster.
    2. Install the Helm chart for Tekton onto that cluster.

    We're going to use the @pulumi/eks package to create the EKS cluster, as it's a high-level component that simplifies the creation and configuration of an EKS cluster. Then, we will use the @pulumi/kubernetes package, namely the helm.v3.Chart resource, to install the Tekton Helm chart.

    First, ensure you have the required Pulumi packages installed on your machine by running:

    npm install @pulumi/eks @pulumi/kubernetes

    Here is a detailed Pulumi program that performs the deployment:

    import * as eks from '@pulumi/eks'; import * as k8s from '@pulumi/kubernetes'; // Create an EKS cluster. const cluster = new eks.Cluster('my-cluster', { desiredCapacity: 2, // Number of worker nodes minSize: 1, maxSize: 2, instanceType: 't3.medium', // Choose an instance type for your workers version: '1.21', // Specify your desired Kubernetes version }); // Export the cluster's kubeconfig. export const kubeconfig = cluster.kubeconfig; // Create an instance of the Kubernetes provider with the cluster's kubeconfig. const k8sProvider = new k8s.Provider('k8s-provider', { kubeconfig: cluster.kubeconfig.apply(JSON.stringify), }); // Deploy the Tekton Helm chart to the EKS cluster const tektonChart = new k8s.helm.v3.Chart( 'tekton', { chart: 'tektoncd', version: '0.15.0', // Specify the chart version you want to deploy fetchOpts: { repo: 'https://charts.tekton.dev', // Tekton Helm chart repository URL }, }, { provider: k8sProvider } ); // Export the Helm chart resources export const tektonChartResources = tektonChart.resources;

    This program does the following:

    • It first declares a new EKS cluster with a desired capacity of 2 worker nodes.
    • It exports the kubeconfig, which can be used to access your EKS cluster with kubectl or other Kubernetes tooling.
    • It then creates an instance of the Kubernetes provider, passing the kubeconfig of our EKS cluster.
    • Finally, it deploys the Tekton Helm chart onto the EKS cluster using the Pulumi Kubernetes provider. The version can be adjusted to install a specific version of Tekton, and the repo is the URL to the Tekton Helm chart repository.

    Please note that the instanceType, version, and chart version are all configuration details that you might want to adjust based on your specific needs or the state of your AWS account, like VPC configurations and available Kubernetes versions respectively.

    Once you run this program with Pulumi (pulumi up), it will provision the resources in your AWS account, and you'll have a running EKS cluster with Tekton installed.

    Ensure that AWS credentials are configured properly on your system, and the Pulumi CLI is logged in and set to use the right stack that maps to your desired deployment environment.