1. Deploy the knative-installer helm chart on AWS EKS


    To deploy the knative-installer Helm chart on AWS EKS using Pulumi, you will need to perform a few key steps.

    Firstly, you need to provision an Amazon EKS cluster. For this task, we will use the eks.Cluster resource from the Pulumi EKS package. This package simplifies the process of creating and managing an EKS cluster.

    Once the EKS cluster is set up, you need to deploy the knative-installer using the kubernetes.helm.v3.Chart resource from the Pulumi Kubernetes provider, which allows you to deploy Helm charts.

    Below is a Pulumi program written in TypeScript that demonstrates these steps:

    import * as pulumi from '@pulumi/pulumi'; import * as awsx from '@pulumi/awsx'; import * as eks from '@pulumi/eks'; import * as k8s from '@pulumi/kubernetes'; // Create an EKS cluster with the default configuration. const cluster = new eks.Cluster("my-cluster", {}); // Export the clusters' kubeconfig. export const kubeconfig = cluster.kubeconfig; // Deploy the knative-installer Helm chart to the EKS cluster. const knativeInstallerChart = new k8s.helm.v3.Chart("knative-installer", { chart: "knative-installer", version: "YOUR_CHART_VERSION", // Replace with the desired chart version fetchOpts: { repo: "YOUR_HELM_CHART_REPO_URL", // Replace with the URL of the Helm chart repository } }, { provider: cluster.provider }); // Export the status of the deployment. export const knativeChartStatus = knativeInstallerChart.status;

    This program creates an EKS cluster and deploys the knative-installer Helm chart to it. You must replace YOUR_HELM_CHART_REPO_URL and YOUR_CHART_VERSION with the actual Helm chart repository URL and desired chart version of knative-installer.

    Explanation of resources used:

    1. eks.Cluster: Represents an AWS EKS cluster. Here the resource is declared with a name "my-cluster" and with the default configuration, which will create an EKS cluster with all the necessary resources, such as the VPC and EC2 instances for the worker nodes. (EKS Cluster Documentation)

    2. k8s.helm.v3.Chart: This resource is used to deploy Helm charts on a Kubernetes cluster. Here, we specify the chart name "knative-installer" and the version. We also provide fetchOpts with the URL of the Helm chart repository. This resource is dependent on the cluster created previously, which is why we pass the provider: cluster.provider argument to ensure the Helm chart is installed on the right cluster. (Helm Chart Documentation)

    After writing this program, you will need to install Pulumi if you haven't already, set up your AWS credentials for Pulumi to use, and then run:

    pulumi up

    This command will preview the changes, and upon confirmation, apply them to your cloud provider (AWS in this case), which will provision an EKS cluster and deploy the knative-installer Helm chart to it. After execution, it will output the kubeconfig which you can use with kubectl to interact with your EKS cluster and check the status of your knative-installer Helm chart deployment.