1. Deploy the scheduler-plugins helm chart on AWS EKS


    To deploy the scheduler-plugins Helm chart on AWS EKS with Pulumi and TypeScript, you'll need to execute a series of steps:

    1. Set up an EKS Cluster: You'll create an Amazon EKS cluster, which is a managed Kubernetes service that makes it easier for you to run Kubernetes on AWS without needing to install and operate your own Kubernetes control plane.

    2. Deploy Helm Chart on EKS: With your EKS cluster in place, you will then use Pulumi's Helm Chart resource to deploy the scheduler-plugins Helm chart.

    Here's a step-by-step guide along with the corresponding Pulumi TypeScript program:

    Setting up AWS EKS Cluster

    First, we'll set up an AWS EKS cluster. We are using the awsx package because it provides higher-level abstractions that simplify EKS cluster creation.

    Deploying the Helm Chart

    Once the EKS cluster has been created, we will use the kubernetes.helm.v3.Chart resource to deploy the scheduler-plugins chart. You will need to provide the chart's repository and version.

    Below is the complete TypeScript program:

    import * as awsx from '@pulumi/awsx'; 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, minSize: 1, maxSize: 2, storageClasses: "gp2", deployDashboard: false, }); // Export the cluster's kubeconfig. export const kubeconfig = cluster.kubeconfig; // Create a Kubernetes provider instance that uses our EKS cluster from above. const provider = new k8s.Provider("provider", { kubeconfig: cluster.kubeconfig.apply(JSON.stringify), }); // Deploy the scheduler-plugins Helm chart to the EKS cluster. // Note: You will need to provide the correct repository and chart name along with the version you want to deploy. const schedulerPluginsChart = new k8s.helm.v3.Chart("scheduler-plugins", { chart: "scheduler-plugins", version: "0.0.1", // Replace with the desired chart version fetchOpts: { repo: "http://<helm chart repo>", // Replace with the Helm chart repository URL }, }, { provider }); // Export the Helm chart name export const helmChartName = schedulerPluginsChart.metadata.apply(m => m.name);

    This Pulumi program uses awsx and eks packages to create an EKS cluster. The desiredCapacity, minSize, and maxSize parameters are customizable based on your needs.

    In this program, the provider is created using the kubeconfig of the EKS cluster. This tells Pulumi to deploy the Helm chart within our newly created EKS cluster.

    The scheduler-plugins Helm chart is then deployed using the Pulumi Kubernetes provider. The version and repo properties need to be set according to the Helm chart you are deploying. If this Helm chart is hosted in a private repository, you will need to add additional configuration to handle access credentials, which are not covered in this example.

    Remember to replace <helm chart repo> with the actual URL of the Helm chart repository that hosts the scheduler-plugins.

    After running this Pulumi program (pulumi up), you will have a running EKS cluster on AWS with the scheduler-plugins Helm chart deployed on it, ready to schedule your workloads. The program exports the name of the Helm chart and the kubeconfig of the cluster, which you can use to interact with your Kubernetes cluster via kubectl.