
cat << EOF > myeks-cluster.yaml



apiVersion: eksctl.io/v1alpha5

kind: ClusterConfig

availabilityZones:

  - ${AWS_REGION}a

  - ${AWS_REGION}b

  - ${AWS_REGION}c

metadata:

  name: ${EKS_CLUSTER_NAME}

  region: ${AWS_REGION}

  version: "1.30"

  tags:

    karpenter.sh/discovery: ${EKS_CLUSTER_NAME}

    created-by: eks-workshop-v2

    env: ${EKS_CLUSTER_NAME}

iam:

  withOIDC: true

vpc:

  cidr: 10.42.0.0/16

  clusterEndpoints:

    privateAccess: true

    publicAccess: true

addons:

  - name: vpc-cni

    version: 1.16.0

    configurationValues: '{"env":{"ENABLE_PREFIX_DELEGATION":"true", "ENABLE_POD_ENI":"true", "POD_SECURITY_GROUP_ENFORCING_MODE":"standard"},"enableNetworkPolicy": "true", "nodeAgent": {"enablePolicyEventLogs": "true"}}'

    resolveConflicts: overwrite

managedNodeGroups:

  - name: default

    desiredCapacity: 3

    minSize: 3

    maxSize: 6

    instanceType: m5.large

    privateNetworking: true

    releaseVersion: "1.30.0-20240625"

    updateConfig:

      maxUnavailablePercentage: 50

    labels:

      workshop-default: "yes"

EOF



eksctl create cluster -f myeks-cluster.yaml

