Using Kubernetes API instead of kubectl
Closed this issue · 3 comments
Are there any thoughts/plans on using the API [1] directly rather than via kubectl (or rely on locally persisted config/credentials)? This article [2] is interesting in this context.
[1] https://kubernetes.io/docs/concepts/overview/kubernetes-api/
[2] http://k8s.uk/kubectl-vs-http-api.html
See discussion here #11
Thanks for the question. I maintain a minimal Kubernetes client myself, so I'm aware of the options here: https://github.com/ericchiang/k8s
From #11: I don't see a good way to handle kubectl parsing + auth providers or kubectl apply logic without importing a significant amount of kubectl. As it stands, this entire plugin is <200 lines of Go, and I'd like to keep it small.
If there are concerns with this strategy, I'm open to hearing them! But closing this issue for now since I believe this answers your original question.
Well, in a production environment, it isn't feasible to have other local tools/local config. Thanks for pointing out #11.
On the flip-side maybe the minimal aspect of this provider might make it a good candidate for building something custom, which minimizes the need for extensive kubectl functionality.