Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

This document provides instructions on how to setup HA Kubernetes cluster on AWS instances using Rancher Kubernetes Engine (RKE).

This document shows how to create and configure 3 control plane VMs (each with 4 vCPUs, 16GB RAM, 80GB disk storage & Ubuntu 18.04.4) and 12 worker VMs (each with 8 vCPUs, 32GB RAM, 160GB disk storage & Ubuntu 18.04.4) through AWS and deploy with HA kubernetes cluster through RKE.

Prerequisite: Users must have AWS account credentials to login and follow the below steps in AWS EC2/VPC dashboard.

1.Create Key Pair

A Key Pair is required to access the created AWS instances and will be used by RKE to configure the VMs for Kubernetes.

If key is already exists use an existing key pair and import through Import Key Pair

  • Go to AWS EC2 dashboard click on Key Pairs in the left panel then click on Actions to Import

      Image Added

  • To Create New Key Pair:

           Go to AWS EC2 dashboard click on Key Pairs in the left panel then click on Create Key Pair

           Image Added

           

       Note: Keep this downloaded key safe and copied into ~/.ssh/ from which it can be referenced.       

Code Block
Example:
       mv onap-key ~/.ssh
       chmod 600 ~/.ssh/onap-key


2.Create VPC       

Go to AWS VPC dashboard click on Your VPCs in the left panel then click on Create VPC

Image Added

3.Create Subnet

Go to AWS VPC dashboard click on Subnets in the left panel then click on Create Subnet

Image Added

4.Create Internet Gateway

Go to AWS VPC dashboard click on Internet Gateways in the left panel then click on Create Internet Gateway

Image Added

Note: Once IGW is created, on the top right corner you will see Attach to VPC. Click on that button to attach this IGW to your VPC as below

Image Added


5.Add Routes with IGW

Go to AWS VPC dashboard click on Route Tables in the left panel then select your routing table click on Routes and Edit Routes to Add route with IGW

Image Added

6.Create Security Group

Click on Create Security Group under EC2>Security Groups fill the details then click create security group

Image Added

Select the created security group click on edit inbound & outbound rules 

Image Added

Add rules for Inbound:

Click on Add rule and fill the details then click on Save Rules

Image Added

Add Rules for Outbound:

Click on Edit Outbound rule and fill the details then click save rules

Image Added

7.Create Kubernetes control plane VMs

Step-1: Launch new instance from EC2 and select the image, click Next

Image Added

Step-2: Choose Instance Type, click Next

Image Added

Step-3: Configure Instance

Select no of instances 3, network with your created VPC, subnet IDs & Enable Auto-assign Public IP  then click Next