eksctl icon indicating copy to clipboard operation
eksctl copied to clipboard

Import eksctl as a library to integrate other utils

Open Jeffwan opened this issue 6 years ago • 15 comments

Why do you want this feature? I am using eksctl to build an eks provision tool in kubeflow community. In my previous version, we use eksctl as a cli in shell scripts to create eks cluster. Now, community is moving to golang ctl and we need to migrate existing functionalities implemented by shell to golang.

I don't know if eksctl can be used for this purpose. I notice no one package import eksctl yet. https://www.grank.io/pkg/github.com/weaveworks/eksctl.html

What feature/behavior/change do you want? Need eksctl SDK to create/delete cluster. All CLI features should be supported in SDK.

Jeffwan avatar May 22 '19 21:05 Jeffwan

/assign @errordeveloper

Jeffwan avatar May 22 '19 21:05 Jeffwan

/cc @kalbir

errordeveloper avatar May 31 '19 06:05 errordeveloper

This would be good to have, and we could use it for testing purposes also.

gemagomez avatar Jun 21 '19 13:06 gemagomez

Is there perhaps an ETA for release of this feature?

zWaR avatar Aug 16 '19 01:08 zWaR

Is there any opportunity to contribute to this effort? We'd love to use this for creating tooling for internal cluster setup that requires more than what's within the scope of eksctl (ie VPC peering), not just because Go is the community standard.

austince avatar Sep 04 '19 14:09 austince

related issue: https://github.com/weaveworks/eksctl/issues/1538

martina-if avatar Apr 14 '20 15:04 martina-if

is there any plan to work on this topic or anyone actively working on it?

jrake-revelant avatar Dec 21 '20 17:12 jrake-revelant

Remaining:

  • [x] Incorrect use of k8s.io/kubernetes (k8s/k8s PR) (see previous attempt to fix)
    • [x] Merged! :partying_face:
    • [x] k8s 1.21 released
  • [x] bump k8s in eksctl to 1.21
  • [ ] Explicitly stabilize some package interfaces (or none for now)

michaelbeaumont avatar Feb 09 '21 13:02 michaelbeaumont

I would pick eksctl any time of the day if we have a sdk so that we can get ride of the scripts needed to integrate with the eksctl.

related to: https://github.com/weaveworks/eksctl/issues/3839

binchenX avatar Jun 12 '21 10:06 binchenX

@errordeveloper can you please help us here, this looks like a must have now.

rverma-dev avatar May 03 '22 00:05 rverma-dev

@errordeveloper can you please help us here, this looks like a must have now.

@rverma-nsl which eksctl operations are you trying to invoke and from what language?

cPu1 avatar May 03 '22 07:05 cPu1

almost all of them, top ones are create cluster, add nodegroup, add irsa roles, patch cluster upgrades and addons.

rverma-dev avatar May 03 '22 09:05 rverma-dev

Why not just call these and abstract the binary calling operations behind an interface for example? How would you benefit from calling these things from code vs calling out to the binary? Once abstracted you can incorporate the calling into unit tests as well if testability is a concern.

Skarlso avatar May 03 '22 09:05 Skarlso

I guess its basically same stuff as kubectl vs client-go. I am also using the same since storing eksctl config in a cm. It can work but won't be super pleasant with all the yaml marshalling :)

rverma-dev avatar May 03 '22 09:05 rverma-dev

You could try and re-create what we do :) Nothing is behind an internal thing, so technically, you could import it. :)

Skarlso avatar May 03 '22 10:05 Skarlso

I'm looking to do this for python, would it be possible to import the go libraries or is there another way to do such an import? For example a C package I can import into Python

farazoman avatar Feb 27 '23 18:02 farazoman