I am working on container security using Kube-bench. I need to check cluster security through rest API or curl. I have done it using CLI but now I need to do this using curl
Anything you can do via kubectl
is possible with the API.
API usage docs are here and then full reference docs are here. For example, creating a deployment
You can also see the APIs being called with kubectl by setting the verbosity level : --v=7
would show request headers and endpoints being called.