I am trying to create a controller that can create and delete Pods via API calls using operator-sdk
with Go
. The controller should be able to accept a POST
call with information such as {imageTag:"", namespace:""}
to setup a Pod that can return a podId
, and also be able to delete a Pod via API call using podId
.
I have reviewed some tutorials, but I am unclear on how the Go operator can intercept API calls. Is this possible? Any help on this matter would be greatly appreciated. Thanks.
Found that Kubernetes Client and Kubernetes Operator are two different concepts. Ended up creating a Kubernetes Go Client using which I was able achieve my goal.
You can refer the library here. https://github.com/kubernetes/client-go