CV and personal site of Andy Hunt
Posted: Monday 22 March 2021 @ 15:15:34
I've been trying to get to grips with Kubernetes, and having all sorts of problems with networking weirdness when using Minikube and Kind. Instead of getting lost down a networking rabbit hole, I decided to just use AWS Elastic Kubernetes Service and AWS Fargate.
To get started, I found myself using a command line tool called eksctl
, which can automate the creation of AWS EKS clusters, and even configuring it to schedule pods on to AWS Fargate.
Creating a new cluster was possible in a single command:
cat <<EOF | eksctl create cluster --alb-ingress-access -f -
---
apiVersion: eksctl.io/v1alpha5
kind: ClusterConfig
metadata:
name: eks-andyhunt
region: eu-west-1
fargateProfiles:
- name: fp-default
selectors:
- namespace: default
- name: fp-system
selectors:
- namespace: kube-system
EOF
Perhaps 10 minutes later, I had a working Kubernetes cluster on to which I could deploy pods and do whatever I needed.
One caveat I discovered is that I needed to deploy the AWS Load Balancer Controller in order to get load balancer ingress in to the cluster. It looked reasonably complicated at first, but once I got going with it wasn't too bothersome.