sparse-intern-71089
09/19/2022, 2:15 PMbillowy-army-68599
few-plastic-88435
09/19/2022, 3:37 PMname: pulumi-eks-yaml
runtime: yaml
description: EKS Cluster Creation. YAML Runtime.
variables:
# Cluster Variables
EKS_CLUSTER_NAME : "ad-internal"
EKS_CLUSTER_VERSION : "1.20"
# Tagging and Taints
ORG_NAME : "Org"
ENV_NAME : "Production"
TEAM_NAME : "OPS"
# VPC ID
AWS_VPC_ID : "vpc-cdf666b0"
# Node Group
NG_MAX_SIZE : 3
NG_MIN_SIZE : 1
NG_DESIRED_CAP : 2
resources:
eks-cluster-config:
type: eks:Cluster
properties:
name: ${EKS_CLUSTER_NAME} # EKS Cluster Name
version: ${EKS_CLUSTER_VERSION} # EKS Cluster Version
createOidcProvider: true
endpointPublicAccess: true
vpcId: ${AWS_VPC_ID}
subnetIds: ["subnet-4ce7a32a", "subnet-ede9aacc", "subnet-73e6f23e"]
clusterTags:
Org: ${ORG_NAME}
Environment: ${ENV_NAME}
ManagedBy: "Pulumi"
Team: ${TEAM_NAME}
# Enable the Cluster Log Types
enabledClusterLogTypes:
- api
- audit
- authenticator
- controllerManager
- scheduler
instanceType: t3.medium
# Configuring the Node Groups Options
desiredCapacity: ${NG_DESIRED_CAP}
maxSize: ${NG_MAX_SIZE}
minSize: ${NG_MIN_SIZE}
encryptRootBlockDevice: true
eks-managed-spot-ng:
type: eks:ManagedNodeGroup
properties:
cluster:
clusterName: ${EKS_CLUSTER_NAME}
amiType: AL2_x86_64
capacityType: SPOT
tags:
Org: ${ORG_NAME}
Environment: ${ENV_NAME}
ManagedBy: "Pulumi"
Team: ${TEAM_NAME}
capacityType: "SPOT"
labels:
Org: ${ORG_NAME}
Environment: ${ENV_NAME}
ManagedBy: "Pulumi"
diskSize: 80
instanceTypes:
- t3.micro
- t3.small
- t3.medium
nodeGroupName: ${EKS_CLUSTER_NAME}-spot-ng
scalingConfig:
minSize: 2
desiredSize: 4
maxSize: 6
forceUpdateVersion: true
eks-managed-on-demand-ng:
type: eks:ManagedNodeGroup
properties:
cluster: ${EKS_CLUSTER_NAME}
clusterName: ${EKS_CLUSTER_NAME}
amiType: AL2_x86_64
capacityType: ON_DEMAND
tags:
Org: ${ORG_NAME}
Environment: ${ENV_NAME}
ManagedBy: "Pulumi"
Team: ${TEAM_NAME}
capacityType: "ON_DEMAND"
labels:
Org: ${ORG_NAME}
Environment: ${ENV_NAME}
ManagedBy: "Pulumi"
diskSize: 80
instanceTypes:
- t3.micro
- t3.small
- t3.medium
nodeGroupName: ${EKS_CLUSTER_NAME}-on-demand-ng
scalingConfig:
minSize: 2
desiredSize: 4
maxSize: 6
forceUpdateVersion: true
outputs:
Cluster_Name: ${eks-cluster-config.id}
kubeconfig: ${eks-cluster-config.kubeconfig}