INDEX
########################################################### 2024-01-04 17:00 ########################################################### Devops Toolkit... eksctl - How to Create and Manage AWS EKS clusters https://www.youtube.com/watch?v=pNECqaxyewQ AWS Web UI > AWS CLI > Terraform > eksctl (simpler) export AWS_ACCESS_KEY_ID=...; export AWS_SECRET_ACCESS_KEY=... export KUBECONFIG=$PWD/kubeconfig.yaml eksctl create cluster # Prompts for info to make a cluster eksctl create cluster --name devops-catalog --region us-east-1 --verison 1.18 \ --nodegroup-name primary ... # Manually put in all data unprompted git clone https://github/vfarcic/eksctl-demo.git; cd eksctl-demo/ # cluster-1.17.yaml # Look at eksctl docs for how to write these apiVersion: eksctl.io/v1alpha5 kind: ClusterConfig metadata: name: devops-catalog region: us-east-1 version: "1.17" # Intentionally old version managedNodeGroups: - name: primary instanceType: t2.small # Size of worker node VMs (minimal for this task) minSize: 3 maxSize: 6 spot: true # Use cheaper instances eksctl create cluster --config-file cluster-1.17.yaml # Takes a long time Look in AWS CloudFormation - stacks created for you - very complicated eksctl get cluster --region us-east-1 # Get kubernetes clusters # To get autoscaling working, need to look at docs for AWS - not built in eksctl scale nodegroupd --cluster devops-catalog --node 4 --name primary # Can scale # To upgrade version, need to make a new node group - change name of group with version eksctl upgrade cluster --config-file cluster-1.18.yaml # Just gives information ... --approve # Actually upgrades control plane (takes a long time with no feedback) kubectl get nodes # Nodes are still on old version eksctl create nodegroup --config-file cluster-1.18.yaml # Makes NEW node group eksctl delete nodegroup --config-file cluster-1.18.yaml --only-missing # Remove old eksctl delete cluster --config-file cluster-1.18.yaml --wait # Delete whole cluster