From 057e022e32a44c5f0f28eed6a3280022f15eb0b1 Mon Sep 17 00:00:00 2001 From: Negash Date: Mon, 25 Nov 2019 23:55:03 +0300 Subject: [PATCH] Update _index.md Quick deploy roles for AWS IAM --- .../en/config-options/cloud-providers/aws/_index.md | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/content/rke/latest/en/config-options/cloud-providers/aws/_index.md b/content/rke/latest/en/config-options/cloud-providers/aws/_index.md index 9ab6c05524d..c14e2e68ae3 100644 --- a/content/rke/latest/en/config-options/cloud-providers/aws/_index.md +++ b/content/rke/latest/en/config-options/cloud-providers/aws/_index.md @@ -12,7 +12,7 @@ cloud_provider: ## IAM Requirements -The nodes used in RKE that will be running the AWS cloud provider must have at least the following IAM policy. +The nodes used in RKE that will be running the AWS cloud provider must have at least the following IAM policy (`rancher-role.json`). ```json { @@ -22,7 +22,7 @@ The nodes used in RKE that will be running the AWS cloud provider must have at l } ``` -In order to use Elastic Load Balancers (ELBs) and EBS with Kubernetes, the node(s) will need to have the an IAM role with appropriate access. +In order to use Elastic Load Balancers (ELBs) and EBS with Kubernetes, the node(s) will need to have the an IAM role with appropriate access (`rancher-policy.json`). ## Example Policy for IAM Role: @@ -54,6 +54,15 @@ In order to use Elastic Load Balancers (ELBs) and EBS with Kubernetes, the node( } ``` +Deploy files to AWS IAM: + +```bash +$ aws iam create-instance-profile --instance-profile-name rancher-node +$ aws iam create-role --role-name rancher-node --assume-role-policy-document file://rancher-role.json +$ aws iam put-role-policy --role-name rancher-node --policy-name rancher-policy --policy-document file://rancher-policy.json +$ aws iam add-role-to-instance-profile --instance-profile rancher-node --role-name rancher-node +``` + ## Tagging Amazon Resources Any resources used in a Kubernetes cluster with the Amazon cloud provider must be tagged with a cluster ID.