We can use https://eksctl.io which is the AWS supported way of setting up a K8's cluster (EKS).
Copy the below (changing it as necessary) into a file called cluster.yaml
. You'll need to set the {ACCOUNT_ID} to your account.
apiVersion: eksctl.io/v1alpha5
kind: ClusterConfig
metadata:
name: bionic-gpt
region: us-east-2
managedNodeGroups:
- name: bionic-gpt
instanceType: t2.large
minSize: 2
maxSize: 4
iam:
withOIDC: true
serviceAccounts:
- metadata:
name: ebs-csi-controller-sa
namespace: kube-system
attachPolicyARNs:
- "arn:aws:iam::aws:policy/service-role/AmazonEBSCSIDriverPolicy"
wellKnownPolicies:
ebsCSIController: true
roleName: eksctl-cluster-ebs-role
roleOnly: true
addons:
- name: aws-ebs-csi-driver
serviceAccountRoleARN: "arn:aws:iam::{ACCOUNT_ID}:role/eksctl-cluster-ebs-role"
eksctl
First a dry run
You should see something like
Run the command without the --dry-run
.
And wait....
And wait....
Finally after 20 minutes or more you'll hopefully have an EKS cluster.
The below will export the kubeconfig to your home directory.
You can then
Follow the "Install Bionic" guide to continue the installation.