Giter VIP home page Giter VIP logo

aws-eks-cluster-controller's Introduction

CircleCI

AWS EKS Cluster Controller

The aws-eks-cluster-controller manages cross account EKS clusters and supported Kubernetes resources.

This controller is built using the kubebuilder framework. For more information read their docs

Concepts

  • Parent EKS Cluster: The Kubernetes cluster where this controller runs.
  • Child EKS Clusters: These are the Kubernetes clusters managed by the controller running in parent EKS cluster.

Turn Key Installation

Prerequisites

Make sure you have following tools installed on your workstation:

  1. aws-cli
  2. kubectl
  3. eksctl
  4. jq
  5. aws-iam-authenticator
  6. kubebuilder - install step

-- or on MacOS via brew --

brew tap weaveworks/tap/eksctl
brew install kustomize kubernetes-cli eksctl awscli jq
go get -u -v github.com/kubernetes-sigs/aws-iam-authenticator/cmd/aws-iam-authenticator

And install kubebuilder

IMPORTANT make sure your AWS user/role has sufficient permissions to use eksctl.

Setup Parent EKS cluster

  1. Create the Parent EKS cluster

    eksctl create cluster
  2. Once eksctl has finished, verify you can access the cluster.

    kubectl get nodes
  3. For this installation process we use kube2iam to manage IAM permissions for pods running on the parent cluster.

    kubectl apply -f deploy/kube2iam.yaml

Build and deploy the Controller

  1. Clone this project

    mkdir -p some/path
    cd some/path
    git clone [email protected]:awslabs/aws-eks-cluster-controller.git
  2. Create the IAM role that the controller will use

    export NODE_INSTANCE_ROLE_ARNS=`aws iam list-roles | jq -r --arg reg_exp "^eksctl-.*-NodeInstanceRole-.*$" '.Roles | map(select(.RoleName|test($reg_exp))) | map(.Arn) | join(",")'`; \
    
    aws cloudformation create-stack \
     --stack-name aws-eks-controller-role \
     --capabilities CAPABILITY_IAM CAPABILITY_NAMED_IAM \
     --template-body file://config/setup/aws-eks-cluster-controller-role.yaml \
     --parameters \
       ParameterKey=WorkerArn,ParameterValue="'${NODE_INSTANCE_ROLE_ARNS}'"
    
    export IAMROLEARN=`aws iam get-role --role-name aws-eks-cluster-controller | jq -r .Role.Arn`
  3. Create repository and build/push image

    # Create ECR Repository
    aws ecr create-repository --repository-name aws-eks-cluster-controller
    export REPOSITORY=`aws ecr describe-repositories --repository-name aws-eks-cluster-controller | jq -r '.repositories[0].repositoryUri'`
    
    # Build/tag the docker image
    IMG=${REPOSITORY}:latest IAMROLEARN=${IAMROLEARN} make docker-build
    
    # Push the docker image
    aws ecr get-login --no-include-email | bash -
    docker push ${REPOSITORY}:latest
  4. Install required Kubernetes CustomResourceDefinitions (CRDs) and deploy controller

    make deploy

License

This library is licensed under the Apache 2.0 License.

aws-eks-cluster-controller's People

Contributors

anand99 avatar chkhd avatar ckrough avatar dcherman avatar jpeddicord avatar madvikinggod avatar magizhchi avatar tantona avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

aws-eks-cluster-controller's Issues

Private EKS Cluster not accessble

Hi, this is srinivasa am created EKS cluster in AWS using EKSCTL but default it will create public eks (API server endpoint access) but it is i need to change this one into private am trying from AWS console after changing in to private from kube-server where i installed kubectl and eksctl i cant able to access that cluster am getting error tcp:ip ip:443 i/o timeout my kubeserver is in private subnet only and all my worker nodes is also in private only but i dont know why am getting this error from my kube-machine please help me for this to troubleshoot incase u need any info i will provide
EKS-version 1.15
thank you

Enforce valid CFN stack and resource names for EKS control plane and nodegroup

CFN Stack name

From https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/cfn-using-console-create-stack-parameters.html

"The stack name is an identifier that helps you find a particular stack from a list of stacks. A stack name can contain only alphanumeric characters (case-sensitive) and hyphens. It must start with an alphabetic character and can't be longer than 128 characters."

Resource names

This will vary for each resource

Prepare community guidance

  • Review the default community guidance documents in the repo and update them for this specific project where necessary.
  • Improve the README to be more descriptive of the projects usage and goals.

Controllers should be run in parallel.

There are 2 controllers current that have a long wait for cloudformation to finish.

These waits, and any future waits should not be a long blocking call. As an alternative it should be a short blocking call, with a delayed requeue.

What I did:

apply a k8s resource file with N eks clusters or N changes

What is expected:

N control planes start creating immediately

What happened:

control planes were created serially, and no changes could be made to others while one was in create.

Release on k8s 1.16.0+ version in EKS

AWS EKS is still in k8s 1.15.0+

Server Version: version.Info{Major:"1", Minor:"15+", GitVersion:"v1.15.11-eks-af3caf", GitCommit:"af3caf6136cd355f467083651cc1010a499f59b1", GitTreeState:"clean", BuildDate:"2020-03-27T21:51:36Z", GoVersion:"go1.12.17", Compiler:"gc", Platform:"linux/amd64"}

Any timeline or roadmap set for the release of k8s 1.16.0+ as part of EKS?

Upgrade to EKS 1.11

When we create a new cluster we should have the option of using EKS-1.11.

Tests fail randomly in CircleCI.

The tests in CircleCI fail randomly with timeout waiting for process kube-apiserver to start.
Kubebuilder version used for CircleCI : v1.0.5

Note:
We have already tried increasing the start timeout for the controlplane components to 60 secs.

Make changes to support less than 3 AZs in a region

Right now https://github.com/awslabs/aws-eks-cluster-controller/blob/master/pkg/controller/controlplane/cfn_template.go#L46-L95 creates 3 Subnets in 3 different AZs, which are then used by Nodegroups to deploy the worker nodes.

This can be issue for deploying EKS cluster using aws-eks-cluster-controller where less than 3 AZs supported; For example ap-south-1(Mumbai) region where only 2 AZs available at the moment:

$ aws ec2 describe-availability-zones --region ap-south-1
{
    "AvailabilityZones": [
        {
            "State": "available",
            "Messages": [],
            "RegionName": "ap-south-1",
            "ZoneName": "ap-south-1a"
        },
        {
            "State": "available",
            "Messages": [],
            "RegionName": "ap-south-1",
            "ZoneName": "ap-south-1b"
        }
    ]
}

We may need to fix the Cloudformation template or make it dynamically generated using goformation

Get EKS AMI's dynamically

In nodegroup controller we are currently hardcoding the value of AMI's. Should see if there is a way to get these values dynamically.

Allow Creation of Clusters in a user Controlled Subnet

Currently it is not possible to create an EKS Cluster outside of the 192.168.0.0/16 subnet.

Expected Resulsts
When defining a cluster a network and subnets can be specified. For example

network:
    vpcCider: "192.168.0.0/16"
    subnet1: "192.168.64.0/18"
    subnet2: "192.168.128.0/18"
    subnet3: "192.168.192.0/18"

And the cluster will be created with the correct subnets.

Verify clientset generation

Double check that our clientset codegen works if we also build components in a different group? E.g. componentsV1alpha1.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.