Method: EksCli::Cli#create_nodegroup

Defined in:
lib/eks_cli/cli.rb

#create_nodegroupObject



116
117
118
119
120
121
122
123
124
125
126
127
# File 'lib/eks_cli/cli.rb', line 116

def create_nodegroup
  with_context do
    opts = options.dup 
    opts[:subnets] = opts[:subnets].map(&:to_i)
    Config[cluster_name].update_nodegroup(opts) unless opts[:all]
    if opts[:yes]
      cf_stacks = nodegroups.map {|ng| ng.create(wait_for_completion: false)}
      CloudFormation::Stack.await(cf_stacks)
      K8s::Auth.new(cluster_name).update
    end
  end
end