kubeclient
kubeclient copied to clipboard
No way to do the equivalent of `kubectl exec`?
Is there a way to do this? I tried the "normal" and the "v1beta1" client, neither had any kind of exec
method after invoking discover
.
I hacked something for learning. You may check it out: kubeclient-exec.rb
Thanks for the POC!!, sorry for not responding.
Due to extra dependencies on websocket-client-simple -> eventmachine, I wasn't sure it's great to add this to kubeclient itself. We already use 2 http libraries, adding a 3rd transport feels a bit funny. I could be convinced otherwise. Depends mainly on weight of resulting deps (didn't check), and whether it can work without C extensions (cf #237).
-
One pattern we've already started applying for auth providers is using a gem without declaring the dependency (well only a dev one, for testing). We just document in README that if you want this functionality you need that extra lib installed (plus raising clear exception, search
AmazonEksDependencyError
for an example). -
Another good option is spin this off into separate gem?
Because I needed something like this, and also a kubectl cp
equivalent, I created kubeclient_exec. Contributions are welcome but it does the basics. I don't have much time to clean up the code though 🙈