Coder Social home page Coder Social logo

pzou1974 / instance-manager Goto Github PK

View Code? Open in Web Editor NEW

This project forked from keikoproj/instance-manager

0.0 2.0 0.0 6.06 MB

Create and manage instance groups with Kubernetes

License: Apache License 2.0

Dockerfile 0.42% Makefile 1.81% Go 89.03% Shell 8.74%

instance-manager's Introduction

instance-manager

Build Status codecov Go Report Card slack version

Create and manage instance groups with Kubernetes.

instance-manager simplifies the creation of worker nodes from within a Kubernetes cluster, create InstanceGroup objects in your cluster and instance-manager will provision the actual machines and bootstrap them to the cluster.

instance-manager

Worker nodes in Kubernetes clusters work best if provisioned and managed using a logical grouping. Kops introduced the term “InstanceGroup” for this logical grouping. In AWS, an InstanceGroup maps to an AutoScalingGroup.

Given a particular cluster, there should be a way to create, read, upgrade and delete worker nodes from within the cluster itself. This enables use-cases where worker nodes can be created in response to Kubernetes events, InstanceGroups can be automatically assigned to namespaces for multi-tenancy, etc.

instance-manager provides this Kubernetes native mechanism for CRUD operations on worker nodes.

Installation

You must first have atleast one instance group that was manually created, in order to host the instance-manager pod.

kubectl create namespace instance-manager
kubectl apply -n instance-manager -f https://raw.githubusercontent.com/keikoproj/instance-manager/master/docs/04_instance-manager.yaml

For more examples and usage, please refer to the Installation Reference Walkthrough.

Usage example

Currently supported provisioners

Provisioner Description Supported?
eks-cf provision nodes on EKS using cloudformation
eks-tf provision nodes on EKS using terraform ⚠️🔜
ec2-kops provision nodes on AWS using Kops ⚠️🔜

To create an instance group, submit an InstanceGroup spec to the controller.

Sample spec

apiVersion: instancemgr.keikoproj.io/v1alpha1
kind: InstanceGroup
metadata:
  name: hello-world
spec:
  # provision for EKS using Cloudformation
  provisioner: eks-cf
  # upgrade strategy
  strategy:
    type: rollingUpdate
  # provisioner configuration
  eks-cf:
    # autoscaling group size
    minSize: 1
    maxSize: 3
    configuration:
      # extra kubelet arguments for taints / labels
      bootstrapArguments: --register-with-taints=my-taint-key=my-taint-value:NoSchedule --node-labels=my-label=true
      # an existing ec2 keypair name
      keyPairName: my-key
      # an EKS compatible AMI
      image: ami-089d3b6350c1769a6
      instanceType: m5.large
      volSize: 20
      # the name of the EKS cluster
      clusterName: my-eks-cluster
      subnets:
      - subnet-1a2b3c4d
      - subnet-4d3c2b1a
      - subnet-0w9x8y7z
      securityGroups:
      - sg-q1w2e3r4t5y6u7i8
      # tags to append to all created resources
      tags:
        - key: mykey
          value: myvalue

Submit & Verify

$ kubectl create -f instance_group.yaml
instancegroup.instancemgr.keikoproj.io/hello-world created

$ kubectl get instancegroups
NAME          STATE                MIN   MAX   GROUP NAME   PROVISIONER   AGE
hello-world   ReconcileModifying   1     3                  eks-cf        10s

some time later, once the cloudformation stacks are created

$ kubectl get instancegroups
NAME          STATE   MIN   MAX   GROUP NAME              PROVISIONER   AGE
hello-world   Ready   1     3     autoscaling-group-name  eks-cf        4m

$ kubectl get nodes
NAME                                        STATUS   ROLES         AGE    VERSION
ip-10-10-10-10.us-west-2.compute.internal   Ready    system        2h     v1.12.7
ip-10-10-10-20.us-west-2.compute.internal   Ready    hello-world   32s    v1.12.7

For more examples and usage, please refer to the Installation Reference Walkthrough.

❤ Contributing ❤

Please see CONTRIBUTING.md.

Developer Guide

Please see DEVELOPER.md.

instance-manager's People

Contributors

eytan-avisror avatar vgunapati avatar

Watchers

James Cloos avatar Ping Zou avatar

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.