Ensure you have the right IAM profile before proceeding with steps
aws sts get-caller-identity --query Arn | grep eksworkshop-admin -q && echo "IAM role valid" || echo "IAM role NOT valid"
weaveworks-workshop
and save the pem fileweaveworks-workshop.pem
ClusterAPI needs credentials to create and manage clusters. To make our lives easier we’ll create an AWS user with AdministratorAccess.
ClusterAPI
and enable “Programmatic access”cd aws-gitops-multicloud
, then run cp ../gitops-cluster-management/.envrc.example .envrc
.envrc
and start populating fields
CAPI_AWS_ACCESS_KEY_ID
to your workshop AWS_ACCESS_KEY_ID
CAPI_AWS_SECRET_ACCESS_KEY
to your workshop AWS_SECRET_ACCESS_KEY
GIT_USER
to your github usernameGIT_REPO_NAME
to your repo name aws-gitops-multicloud
AWS_REGION
to us-west-2
AWS_SSH_KEY_NAME
to weaveworks-workshop
that we created earlierAWS_CONTROL_PLANE_MACHINE_TYPE
and AWS_NODE_MACHINE_TYPE
as t3.large
direnv allow
. Which will export these env vars whenever you’re in the git repo directory.You should see an eks cluster already provisioned when running
eksctl get clusters
We’ll need kubeconfig credentials. You can get it with
eksctl utils write-kubeconfig --cluster EKS-YOURCLUSTERNAME
Run this only in case any error occurs during eksctl cluster creation
# increase disk space
curl -LO https://raw.githubusercontent.com/aws-samples/aws-modernization-devsecops/master/scripts/resize.sh
chmod +x resize.sh
./resize.sh 30
# clear up some space
docker system prune -a -f
# install kind
curl -Lo ./kind https://kind.sigs.k8s.io/dl/v0.8.1/kind-linux-amd64
chmod +x ./kind
sudo mv ./kind /usr/local/bin/kind
# create local cluster to act as our management cluster
kind create cluster