Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- * Create the IAM permission policy
- ```
- aws iam create-policy --policy-name kopsK8sEC2MasterPerms --policy-doc file://kopsK8sEC2MasterPerms.json
- ```
- * Get policy's ARN
- ```
- POLICY_ARN=$(aws iam list-policies | jq ".Policies[] | select(.PolicyName | contains(\"kopsK8sEC2MasterPerms\")) | .Arn" -r)
- ```
- * Check for the name of the role attached to the master nodes
- ```
- aws iam list-roles | jq ".Roles[] | select(.RoleName | contains(\"masters.$CLUSTER_NAME.$DOMAIN\"))"
- ```
- * Link the new policy to the role
- ```
- aws iam attach-role-policy --role-name masters.$CLUSTER_NAME.$DOMAIN --policy-arn $POLICY_ARN
- ```
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement