Clusters / Template

AWS EKS Cluster with BYO VPC

Deploy a managed Kubernetes cluster on AWS EKS with your existing VPC

Overview

AWS account with existing VPC setup. This template provides the YAML configuration for deploying an AWS EKS cluster using your own VPC configuration.

Category
Clusters
Source
clusters/aws/eks/existing-vpc.yaml

Prerequisites & dependencies

  • Your AWS account id is required to deploy the cluster. You can get it by running `aws sts get-caller-identity`
  • You must follow the instruction - https://astropulse.io/docs/latest/platform/cluster-pipeline/features/provisioner/managed/eks
  • You must follow the instruction - https://astropulse.io/docs/latest/platform/cluster-pipeline/features/provisioner/managed/eks#bring-your-own-vpc-byovpc

No dependencies are listed in the available catalog metadata. This is not a guarantee that none are required.

Source manifest

clusters/aws/eks/existing-vpc.yaml

# EKS cluster in an existing VPC
#
# Before you apply:
#   1. A VPC with a public and a private subnet in at least two availability
#      zones. `astroctl cloud aws generate-vpc` writes a CloudFormation template
#      for one.
#   2. Connect the account:
#        astroctl cloud aws connect --account-id <YOUR_AWS_ACCOUNT_ID> --cluster-name <YOUR_CLUSTER_NAME> --region <YOUR_REGION>
#
# Apply: astroctl infra k8s apply -f existing-vpc.yaml --dry-run, then without --dry-run
# Docs:  https://astropulse.io/docs/latest/platform/cluster-pipeline/features/provisioner/managed/eks
apiVersion: platform.astropulse.io/v1
kind: K8sCluster
spec:
  clusterName: <YOUR_CLUSTER_NAME>
  provider: aws
  region: <YOUR_REGION>
  provisioner:
    type: eks
    eks:
      accountId: "<YOUR_AWS_ACCOUNT_ID>"
      vpcId: "<YOUR_VPC_ID>"           # such as vpc-0abc1234def56789a
      vpcCIDR: "10.0.0.0/16"           # the VPC's CIDR block
      # One entry per availability zone in the region (such as us-east-2a),
      # each with one public and one private subnet. Add or remove zones to
      # match your region.
      subnets:
        <YOUR_ZONE_A>:
          - type: Public
            id: "<YOUR_PUBLIC_SUBNET_A>"    # such as subnet-0abc1234def56789a
          - type: Private
            id: "<YOUR_PRIVATE_SUBNET_A>"
        <YOUR_ZONE_B>:
          - type: Public
            id: "<YOUR_PUBLIC_SUBNET_B>"
          - type: Private
            id: "<YOUR_PRIVATE_SUBNET_B>"
        <YOUR_ZONE_C>:
          - type: Public
            id: "<YOUR_PUBLIC_SUBNET_C>"
          - type: Private
            id: "<YOUR_PRIVATE_SUBNET_C>"
      credentials:
        type: Dynamic
  clusterSpec:
    dataPlane:
      nodeGroups:
        - name: default-pool
          minNode: 1
          maxNode: 3
          instanceType: OnDemand
          machineTypes:
            - t3.medium
          labels:
            environment: production

Deployment guidance

Go straight to Console to create clusters, deploy applications, and manage supported resources. Templates and CLI commands are optional; not every GitHub manifest has an automatic import path.

Console — start directly

Open Console to create or connect infrastructure and deploy applications without running astroctl or copying this YAML first. This template may still require manual setup.

Open Console

astroctl

Get your AWS account ID

aws sts get-caller-identity --query Account --output text

Connect your AWS account

astroctl cloud aws connect --account-id <account-id> --cluster-name <YOUR_CLUSTER_NAME> --region us-west-2

Deploy the AWS EKS cluster with VPC configuration

astroctl infra k8s apply -f clusters/aws/eks/existing-vpc.yaml

Get the AWS EKS cluster name

astroctl infra k8s get <YOUR_CLUSTER_NAME>

Get the stream of cluster creation progress

astroctl infra k8s progress stream <YOUR_CLUSTER_NAME>

Generates kubeconfig and sets the context

astroctl infra k8s set-context <YOUR_CLUSTER_NAME>

Any kubectl command can be used to manage the cluster

kubectl ...

Delete the AWS EKS cluster

astroctl infra k8s delete <YOUR_CLUSTER_NAME>

Review placeholders and permissions before running commands. Nothing executes from this page.

Get Started

Nova

Prefer to describe the goal? Ask Nova to review this example and help plan supported actions. Access, policy, and approvals still apply.