Accessing EKS API Server from AWS EC2 instance using IAM Instance Profile (No Static Credentials)

Overview In this post, I am going to describe how to maintain access to Amazon AWS EKS - Kubernetes cluster with only attaching an IAM Role as an instance profile, without configuring access keys on the EC2 instance. The benefit of course is not storing any Amazon IAM credentials on the EC2 instance, having your infrastructure more secure. Use Case: Jenkins CI/CD Pipeline In my use case, I wanted to have my Jenkins CI server have access to EKS cluster for adding continuous delivery using Jenkins declarative pipeline to my continuous integration process. By doing that, I achieved a full CI/CD process for all the microservices that Jenkins handled. ...

May 28, 2019 · 5 min · 1034 words · Omer