EKS
eksctl
- https://eksctl.io/ - The official cli for EKS
- eksctl releases - use asdf-vm to install
After create get kube config file with:
eksctl utils write-kubeconfig --cluster=$CLUSTER aws eks update-kubeconfig \ --region us-west-2 --name x-prod-us-west-2 \ --kubeconfig ~/.kube/x-prod-us-west-2.config
- eksctl examples - weaveworks
Addons
- Addons - main site
Convert from self-managed to EKS managed
- Look at LENS applications to see what is loaded
- Use kubectl delete -f <url>. can ask chatGPT to find url
- Then eksctl create addon -f <eksctl config file>
- https://github.com/aws/eks-charts - addons in the form of Helm Charts. Add to config might be better?
eksctl utils describe-addon-versions --cluster $CLUSTER |grep AddonName
EKS Auto Mode
scripts
curl -s https://oidc.eks..../.well-known/openid-configuration|jq
Helm Charts
- https://github.com/aws/eks-charts - mainly tied to aws paid services
Network
Convert control-plane access to private
aws eks update-cluster-config \ --region us-west-2 \ --name my-cluster \ --resources-vpc-config endpointPublicAccess=false,endpointPrivateAccess=true,securityGroupIds=sg-allowed aws eks update-cluster-config \ --name my-cluster \ --resources-vpc-config publicAccessCidrs=203.0.113.0/24- Use IP of a bastion
- See my AI trail
Storage
ebs-csi-controller
# att last two lines to deployment tolerations: - key: CriticalAddonsOnly operator: Exists - operator: Exists effect: NoExecute tolerationSeconds: 300 - operator: Exists effect: NoSchedule
Security / IAM
IAM Roles for service accounts (IRSA)
eksctl create iamserviceaccountuses CloudFormation
- https://github.com/jtblin/kube2iam - IAM with annotations
https://github.com/keikoproj/aws-auth
kubectl krew install aws-auth
https://github.com/princespaghetti/actionhero
- sidecar to check policies
Scanners
Troubleshooting
Auth
aws eks get-token --cluster-name xxx # get kubeconfig aws --region us-west-2 eks update-kubeconfig --name clustername
Upgrade EKS
aws eks update-kubeconfig --name $CLUSTER aws eks list-nodegroups --cluster-name $CLUSTERFeatures we have enabled
- AWS LoadBalancer
- VPC CNI
- CoreDNS
- Best Practices - Upgrades
- https://github.com/FairwindsOps/pluto - tool to help with k8s objects upgrade
- 2023-01-12 Current
v1.18.9-eks-d1db3c
- https://github.com/marcincuber/eks - See Marcincuber on Medium upgrade notes here
- See links in email: Update
- eksupgrade - script not so sure