DevOps virtualization
When asked for roles, do not use LabRole, use the other one that usually has the word EKS in it.
Navigate to EKS service
LabEksClusterRole for thee Cluster IAM roleLabRole for Node IAM roleI started with a blank ubuntu vm (one that had no other garbage on it):
$HOME/.aws/credentials file with contents given on lab console.aws sts get-caller-identity (verifies connectivity)aws eks --region us-east-1 update-kubeconfig --name testcluster, this will put connection settings in a file to interact with EKS. (Assuming your cluster that you created above is named testcluster, if not, change this command to reflect your cluster name)kubectl get nodes, may not have any nodes until they come online from part one.kubectl create deployment --image=nginx nginx --dry-run=client -o yaml > nginx.yamlNow create a service of type LoadBalancer
apiVersion: v1
kind: Service
metadata:
name: nginx
labels:
app: nginx
annotations:
service.beta.kubernetes.io/aws-load-balancer-scheme: "internet-facing"
spec:
type: LoadBalancer
loadBalancerClass: eks.amazonaws.com/nlb
selector:
app: nginx
ports:
- name: http
port: 80
targetPort: 80
protocol: TCP
Apply the file.
You should be able to see a public endpoint for kubectl get svc. See if you can connect and see nginx. Might take a few minutes. (Make sure you use http and NOT https)