Created
December 2, 2019 10:01
-
-
Save karngyan/76fb1398ffa3832e01c033c7cead97a5 to your computer and use it in GitHub Desktop.
Node Group Instance Role CF Script - Used when creating node groups in cluster
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Recommended to create a new worker node IAM role for each cluster. | |
# Otherwise, a node from one cluster could authenticate with another | |
# cluster that it does not belong to. | |
--- | |
AWSTemplateFormatVersion: "2010-09-09" | |
Description: Amazon EKS - Node Group Role | |
Resources: | |
NodeInstanceRole: | |
Type: "AWS::IAM::Role" | |
Properties: | |
AssumeRolePolicyDocument: | |
Version: "2012-10-17" | |
Statement: | |
- Effect: Allow | |
Principal: | |
Service: | |
- ec2.amazonaws.com | |
Action: | |
- "sts:AssumeRole" | |
ManagedPolicyArns: | |
- "arn:aws:iam::aws:policy/AmazonEKSWorkerNodePolicy" | |
- "arn:aws:iam::aws:policy/AmazonEKS_CNI_Policy" | |
- "arn:aws:iam::aws:policy/AmazonEC2ContainerRegistryReadOnly" | |
Path: / | |
Outputs: | |
NodeInstanceRole: | |
Description: The node instance role | |
Value: !GetAtt NodeInstanceRole.Arn |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment