Skip to content

Instantly share code, notes, and snippets.

@henryeleonu
Last active December 18, 2022 21:05
Show Gist options
  • Save henryeleonu/e395c72d413a2b7c8001f1d2cb839b32 to your computer and use it in GitHub Desktop.
Save henryeleonu/e395c72d413a2b7c8001f1d2cb839b32 to your computer and use it in GitHub Desktop.
MANIFEST FOR CREATION OF CLUSTER
apiVersion: eksctl.io/v1alpha5
kind: ClusterConfig
metadata:
name: spark-eks
region: us-east-1
version: "1.23"
availabilityZones: ["us-east-1a", "us-east-1b"]
vpc:
# If you wish to use an existing VPC, please provide the subnet ID, change the availability zones above accordingly
# subnets:
# private:
# us-east-1a: { id: <YOUR_SUBNET_ID> }
# us-east-1b: { id: <YOUR_SUBNET_ID> }
nat:
gateway: HighlyAvailable # other options: Disable, Single (default)
clusterEndpoints:
publicAccess: true
privateAccess: true
#cloudWatch:
#clusterLogging:
# enable specific types of cluster control plane logs
#enableTypes: ["all"]
# all supported types: "api", "audit", "authenticator", "controllerManager", "scheduler"
# supported special values: "*" and "all"
iam:
withOIDC: true
serviceAccounts:
- metadata:
name: cluster-autoscaler
namespace: kube-system
labels: {aws-usage: "cluster-ops"}
attachPolicy: # inline policy can be defined along with `attachPolicyARNs`
Version: "2012-10-17"
Statement:
- Effect: Allow
Action:
- "autoscaling:DescribeAutoScalingGroups"
- "autoscaling:DescribeAutoScalingInstances"
- "autoscaling:DescribeLaunchConfigurations"
- "autoscaling:DescribeTags"
- "autoscaling:SetDesiredCapacity"
- "autoscaling:TerminateInstanceInAutoScalingGroup"
- "ec2:DescribeLaunchTemplateVersions"
Resource: '*'
managedNodeGroups:
# Nodegroup used to support tools like Kubedashboard, Cluster Autoscaler...
- name: tooling
instanceType: t3.medium
minSize: 2
maxSize: 7
desiredCapacity: 4
volumeSize: 20
labels:
noderole: tooling
tags:
k8s.io/cluster-autoscaler/node-template/label/noderole: tooling
k8s.io/cluster-autoscaler/experiments: owned
k8s.io/cluster-autoscaler/enabled: "true"
iam:
withAddonPolicies:
ebs: true
fsx: true
efs: true
autoScaler: true
cloudWatch: true
attachPolicyARNs:
- arn:aws:iam::aws:policy/AmazonEKSWorkerNodePolicy
- arn:aws:iam::aws:policy/AmazonEKS_CNI_Policy
- arn:aws:iam::aws:policy/AmazonEC2ContainerRegistryReadOnly
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment