diff --git a/content/rancher/v2.x/en/cluster-provisioning/rke-clusters/node-pools/ec2/_index.md b/content/rancher/v2.x/en/cluster-provisioning/rke-clusters/node-pools/ec2/_index.md index 54bba1dbad9..3a6284fce7d 100644 --- a/content/rancher/v2.x/en/cluster-provisioning/rke-clusters/node-pools/ec2/_index.md +++ b/content/rancher/v2.x/en/cluster-provisioning/rke-clusters/node-pools/ec2/_index.md @@ -11,18 +11,133 @@ Use {{< product >}} to create a Kubernetes cluster in Amazon EC2. 1. Choose **Amazon EC2**. 1. Enter a **Cluster Name**. 1. {{< step_create-cluster_member-roles >}} -1. {{< step_create-cluster_cluster-options >}} +1. {{< step_create-cluster_cluster-options >}}Refer to Selecting Cloud Providers to configure the Kubernetes Cloud Provider.
1. {{< step_create-cluster_node-pools >}} - 1. Click **Add Node Template**. +1. Click **Add Node Template**. + + Complete each of the following forms using information available from the [EC2 Management Console](https://aws.amazon.com/ec2). - - **Account Access** holds the region and API Key used to create the cluster. - [Amazon Documentation: Creating Access Keys](https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_access-keys.html#Using_CreateAccessKey) - - **Zone and Network** configures the availability zone and network settings for your cluster. - - **Security Groups** configures the security groups applied to your cluster. - - **Instance** provisions your VM instances. + + * **Account Access** is there you configure the region of the nodes, and the credentials (Access Key and Secret Key) used to create the machine. + + [Amazon Documentation: Creating Access Keys](https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_access-keys.html#Using_CreateAccessKey). + + See [Example Node IAM policy](#example-node-iam-policy) for an example policy that can be applied to these credentials. + - **Zone and Network** configures the availability zone and network settings for your cluster. + - **Security Groups** creates or configures the security groups applied to your nodes. + - **Instance** configures the instances that will be created. Make sure you configure the correct **SSH User** for the configured AMI. + + If you need to pass an **IAM Instance Profile Name** (not ARN), for example, when you want to use a [Kubernetes Cloud Provider]({{< baseurl >}}/rancher/v2.x/en/cluster-provisioning/rke-clusters/options/cloud-providers), you will need an additional permission in your policy. See [Example Node IAM policy with PassRole](#example-node-iam-policy-with-passrole) for an example policy. + 1. {{< step_rancher-template >}} - 1. Click **Create**. + 1. Click **Create**. 1. **Optional:** Add additional node pools. -1. Review your cluster settings to confirm they're correct. Then click **Create**. +1. Review your cluster settings to confirm they are correct. Then click **Create**. {{< result_create-cluster >}} + +### Example Node IAM Policy + +```json +{ + "Version": "2012-10-17", + "Statement": [ + { + "Sid": "VisualEditor0", + "Effect": "Allow", + "Action": [ + "ec2:AuthorizeSecurityGroupIngress", + "ec2:Describe*", + "ec2:ImportKeyPair", + "ec2:CreateKeyPair", + "ec2:CreateSecurityGroup", + "ec2:CreateTags", + "ec2:DeleteKeyPair" + ], + "Resource": "*" + }, + { + "Sid": "VisualEditor1", + "Effect": "Allow", + "Action": [ + "ec2:RunInstances" + ], + "Resource": [ + "arn:aws:ec2:REGION::image/ami-*", + "arn:aws:ec2:REGION:AWS_ACCOUNT_ID:instance/*", + "arn:aws:ec2:REGION:AWS_ACCOUNT_ID:placement-group/*", + "arn:aws:ec2:REGION:AWS_ACCOUNT_ID:volume/*", + "arn:aws:ec2:REGION:AWS_ACCOUNT_ID:subnet/*", + "arn:aws:ec2:REGION:AWS_ACCOUNT_ID:key-pair/*", + "arn:aws:ec2:REGION:AWS_ACCOUNT_ID:network-interface/*", + "arn:aws:ec2:REGION:AWS_ACCOUNT_ID:security-group/*", + ] + }, + { + "Sid": "VisualEditor2", + "Effect": "Allow", + "Action": [ + "ec2:RebootInstances", + "ec2:TerminateInstances", + "ec2:StartInstances", + "ec2:StopInstances" + ], + "Resource": "arn:aws:ec2:REGION:AWS_ACCOUNT_ID:instance/*" + } + ] +} +``` + +### Example Node IAM Policy with PassRole + +```json +{ + "Version": "2012-10-17", + "Statement": [ + { + "Sid": "VisualEditor0", + "Effect": "Allow", + "Action": [ + "ec2:AuthorizeSecurityGroupIngress", + "ec2:Describe*", + "ec2:ImportKeyPair", + "ec2:CreateKeyPair", + "ec2:CreateSecurityGroup", + "ec2:CreateTags", + "ec2:DeleteKeyPair" + ], + "Resource": "*" + }, + { + "Sid": "VisualEditor1", + "Effect": "Allow", + "Action": [ + "iam:PassRole", + "ec2:RunInstances" + ], + "Resource": [ + "arn:aws:ec2:REGION::image/ami-*", + "arn:aws:ec2:REGION:AWS_ACCOUNT_ID:instance/*", + "arn:aws:ec2:REGION:AWS_ACCOUNT_ID:placement-group/*", + "arn:aws:ec2:REGION:AWS_ACCOUNT_ID:volume/*", + "arn:aws:ec2:REGION:AWS_ACCOUNT_ID:subnet/*", + "arn:aws:ec2:REGION:AWS_ACCOUNT_ID:key-pair/*", + "arn:aws:ec2:REGION:AWS_ACCOUNT_ID:network-interface/*", + "arn:aws:ec2:REGION:AWS_ACCOUNT_ID:security-group/*", + "arn:aws:iam::AWS_ACCOUNT_ID:role/your-role-name" + ] + }, + { + "Sid": "VisualEditor2", + "Effect": "Allow", + "Action": [ + "ec2:RebootInstances", + "ec2:TerminateInstances", + "ec2:StartInstances", + "ec2:StopInstances" + ], + "Resource": "arn:aws:ec2:REGION:AWS_ACCOUNT_ID:instance/*" + } + ] +} +``` diff --git a/layouts/shortcodes/step_create-cluster_cluster-options.html b/layouts/shortcodes/step_create-cluster_cluster-options.html index 28064c50abd..5e15db10ed1 100644 --- a/layouts/shortcodes/step_create-cluster_cluster-options.html +++ b/layouts/shortcodes/step_create-cluster_cluster-options.html @@ -1 +1 @@ -Use Cluster Options to choose the version of Kubernetes installed on each cluster node, along with some other options for you cluster.
Use Cluster Options to choose the version of Kubernetes, what network provider will be used, if you want to enable Pod Security Policies and wether the nodes added to this cluster need to have a supported Docker version installed. diff --git a/layouts/shortcodes/step_create-cluster_node-pools.html b/layouts/shortcodes/step_create-cluster_node-pools.html index 7b3154d378f..984765e6f5d 100644 --- a/layouts/shortcodes/step_create-cluster_node-pools.html +++ b/layouts/shortcodes/step_create-cluster_node-pools.html @@ -1,10 +1,10 @@ -
Add one or more Node Pools to your cluster. A node pool is a set of virtual machines configured identically to your Linux host. However, each node in the pool also has additional Kubernetes master and worker components installed.
+
Add one or more Node Pools to your cluster.
A Node Pool is a collection of nodes based on a Node Template. A Node Template defines the configuration of a Node, like what Operating System image, number of CPUs and amount of RAM. Each Node Pool can have one or more Nodes Roles associated with it.
diff --git a/layouts/shortcodes/step_rancher-template.html b/layouts/shortcodes/step_rancher-template.html index d17c5be1616..859cff143f0 100644 --- a/layouts/shortcodes/step_rancher-template.html +++ b/layouts/shortcodes/step_rancher-template.html @@ -1,13 +1,18 @@ -Notes:
-
- After you create each node template, you can use it to create additional node pools.
-- Each Kubernetes role (i.e.
-etcd,Control, andWorker) must be filled. You can either apply all three roles to one pool or spread them around.- Ideally, you should have at least three
+etcdnodes so that your cluster can fail over to another if a etcd node goes down.- After you create a Node Template, it will be saved and you will be able to re-use it in additional Node Pools.
+- Each Node Role (i.e.
+etcd,Control Plane, andWorker) must be fulfilled. Although it is possible to apply multiple Node Roles to a Node Pool, this is not recommended.- The recommended setup is to have a Node Pool with the
etcdNode Role and a count of three, a Node Pool with theControl PlaneNode Role and a count of at least two, and a Node Pool with theWorkerNode Role and a count of at least two. Regarding theetcdNode Role, refer to the etcd Admin Guide.
Complete the Rancher Template form to add metadata so that you can find your template in Rancher later.
+Complete the Rancher Template form to configure the Docker daemon on the instances that will be created.
Labels apply metadata to your Docker objects.
+Labels can be configured on the Docker daemon.
Engine Options customize the configuration of the Docker daemon.
+Engine Options customize the configuration of the Docker daemon. Important configuration options might include: +