1. Packages
  2. AWS
  3. How-to Guides
  4. AWS C# EKS Cluster
AWS v6.73.0 published on Wednesday, Mar 19, 2025 by Pulumi

AWS C# EKS Cluster

AWS v6.73.0 published on Wednesday, Mar 19, 2025 by Pulumi

View Code Deploy this example with Pulumi

This example creates an AWS EKS Cluster and deploys a sample container application to it

Deploying the App

To deploy your infrastructure, follow the below steps.

Prerequisites

  1. Install Pulumi
  2. Install DotNet SDK
  3. Configure AWS Credentials
  4. Install aws-iam-authenticator
  5. Install kubectl

Steps

After cloning this repo, run these commands from the working directory:

  1. Create a new stack, which is an isolated deployment target for this example:

    $ pulumi stack init dev
    
    Copy
  2. Set your desired AWS region:

    $ pulumi config set aws:region us-east-1 # any valid AWS region will work
    
    Copy
  3. Execute the Pulumi program to create our EKS Cluster:

    pulumi up
    
    Copy
  4. After 10-15 minutes, your cluster will be ready, and the kubeconfig JSON you’ll use to connect to the cluster will be available as an output. You can save this kubeconfig to a file like so:

    $ pulumi stack output kubeconfig --show-secrets >kubeconfig.json
    
    Copy

    Once you have this file in hand, you can interact with your new cluster as usual via kubectl:

    $ KUBECONFIG=./kubeconfig.json kubectl get nodes
    
    Copy
  5. Ensure that the application is running as expected:

    $ curl $(pulumi stack output Url)
    
    Copy
  6. Afterwards, destroy your stack and remove it:

    pulumi destroy --yes
    pulumi stack rm --yes
    
    Copy
AWS v6.73.0 published on Wednesday, Mar 19, 2025 by Pulumi