amazon-archives / aws-service-operator

AWS Service Operator allows you to create AWS resources using kubectl.
Apache License 2.0
733 stars 103 forks source link

EKS Node Group Support #179

Open christopherhein opened 5 years ago

christopherhein commented 5 years ago

Issue #, if available: #109

Description of changes: Adds the ability to describe an EKSNodeGroup using a CRD and will automatically deploy the ASG. You currently will still need to add the IAM role into configmaps/aws-auth to allow it to join but you can get this by using:

kubectl get eksnodegroup <ng-name> -o  jsonpath="{.output.nodeInstanceRole}"

Definition

apiVersion: service-operator.aws/v1alpha1
kind: EKSNodeGroup
metadata:
  name: example-eks-nodegroup
spec:
  clusterName: "<cluster-name>"
  node:
    imageID: ami-XXXXX
    instanceType: m5.large
    volumeSize: 20
    # bootstrapArguments: ""
    keyName: ""
  autoScalingGroup:
    minSize: 2
    maxSize: 4
    desiredCapacity: 3
  networking:
    controlPlaneSecurityGroup: sg-XXXXX
    vpcID: vpc-XXXXX
    subnets: subnet-XXXXX,subnet-XXXXX,subnet-XXXXX

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.