Amazon EKS cluster IAM role
Kubernetes clusters managed by Amazon EKS make calls to other Amazon services on your behalf to manage the resources that you use with the service. Before you can create Amazon EKS clusters, you must create an IAM role with the following IAM policies:
Prior to April 16, 2020, AmazonEKSServicePolicy was also required and the suggested name was
eksServiceRole
. With the AWSServiceRoleForAmazonEKS
service-linked
role, that policy is no longer required for clusters created on or after April 16, 2020.
Check for an existing cluster role
You can use the following procedure to check and see if your account already has the Amazon EKS cluster role.
To check for the eksClusterRole
in
the IAM console
Open the IAM console at https://console.amazonaws.cn/iam/
. -
In the left navigation pane, choose Roles.
-
Search the list of roles for
eksClusterRole
. If a role that includeseksClusterRole
doesn't exist, then see Creating the Amazon EKS cluster role to create the role. If a role that includeseksClusterRole
does exist, then select the role to view the attached policies. -
Choose Permissions.
-
Ensure that the AmazonEKSClusterPolicy managed policy is attached to the role. If the policy is attached, your Amazon EKS cluster role is properly configured.
-
Choose Trust relationships, and then choose Edit trust policy.
-
Verify that the trust relationship contains the following policy. If the trust relationship matches the following policy, choose Cancel. If the trust relationship doesn't match, copy the policy into the Edit trust policy window and choose Update policy.
{ "Version": "2012-10-17", "Statement": [ { "Effect": "Allow", "Principal": { "Service": "eks.amazonaws.com" }, "Action": "sts:AssumeRole" } ] }
Creating the Amazon EKS cluster role
You can use the Amazon Web Services Management Console or the Amazon CLI to create the cluster role.