How do i setup the pre-reqs for eks - aws kubernetes service?



  • AWS reference page: https://docs.aws.amazon.com/eks/latest/userguide/getting-started.html

    To use AWS EKS, there are some pre-reqs required.

    • Create a AWS EKS service role.
    • Create a VPC for the Kubernetes cluster.

    To create your Amazon EKS service role

    Open the IAM console at https://console.aws.amazon.com/iam/.
    Choose Roles, then Create role.
    Choose EKS from the list of services, then Allows Amazon EKS to manage your clusters on your behalf for your use case, then Next: Permissions.
    Choose Next: Review.

    For Role name, enter a unique name for your role, such as eksServiceRole, then choose Create role.

    Create a VPC for the Kubernetes cluster.

    As this is a demo, amazon provides the s3 template to create the VPC, subnets, IP ranges, etc. The cloud formation templated is provided by AWS.

    Open the AWS CloudFormation console at https://console.aws.amazon.com/cloudformation.

    From the navigation bar, select a Region that supports Amazon EKS.

    Note:
    Amazon EKS is available in the following Regions at this time:
    US West (Oregon) (us-west-2)
    US East (N. Virginia) (us-east-1)
    Choose Create stack.

    For Choose a template, select Specify an Amazon S3 template URL.

    Paste the following URL into the text area and choose Next:

    https://amazon-eks.s3-us-west-2.amazonaws.com/1.10.3/2018-06-05/amazon-eks-vpc-sample.yaml

    On the Specify Details page, fill out the parameters accordingly, and then choose Next.

    Stack name: Choose a stack name for your AWS CloudFormation stack. For example, you can call it eks-vpc.

    VpcBlock: Choose a CIDR range for your VPC. You may leave the default value.

    Subnet01Block: Choose a CIDR range for subnet 1. You may leave the default value.

    Subnet02Block: Choose a CIDR range for subnet 2. You may leave the default value.

    Subnet03Block: Choose a CIDR range for subnet 3. You may leave the default value.

    (Optional) On the Options page, tag your stack resources. Choose Next.

    How do i create an eks - aws kubernetes cluster?

    On the Review page, choose Create.

    When your stack is created, select it in the console and choose Outputs.

    Record the SecurityGroups value for the security group that was created. You need this when you create your EKS cluster; this security group is applied to the cross-account elastic network interfaces that are created in your subnets that allow the Amazon EKS control plane to communicate with your worker nodes.

    Record the VpcId for the subnets that were created. You need this when you launch your worker node group template.

    Record the SubnetIds for the subnets that were created. You need this when you create your EKS cluster; these are the subnets that your worker nodes are launched into.


Log in to reply
 

© Lightnetics 2024