Test the Cluster

Test the cluster:

Confirm your Nodes:

kubectl get nodes -o wide # if we see our 2 nodes, we know we have authenticated correctly

Export the Worker Role Name for use throughout the workshop

STACK_NAME=$(eksctl get nodegroup --cluster networkshop-eksctl -o json | jq -r '.[].StackName')
INSTANCE_PROFILE_ARN=$(aws cloudformation describe-stacks --stack-name $STACK_NAME | jq -r '.Stacks[].Outputs[] | select(.OutputKey=="InstanceProfileARN") | .OutputValue')
ROLE_NAME=$(aws cloudformation describe-stacks --stack-name $STACK_NAME | jq -r '.Stacks[].Outputs[] | select(.OutputKey=="InstanceRoleARN") | .OutputValue' | cut -f2 -d/)
echo "export ROLE_NAME=${ROLE_NAME}" >> ~/.bash_profile
echo "export INSTANCE_PROFILE_ARN=${INSTANCE_PROFILE_ARN}" >> ~/.bash_profile


You now have a fully working Amazon EKS Cluster that is ready to use!