Use K8s REST API with ONLY curl or similar (without kubectl)

Is there any way to interact with K8s as if it was a normal REST API?

I mean:

  1. You have a .kubeconfig
  2. You want to interact with k8s REST API, but you don’t have kubectl, only curl (or a programming language, like Ruby that can only make normal HTTP requests)

Is there any way to achieve that?

Is there any complete example with curl or REST for a simple command like kubectl get nodes? All the examples that I find use kubectl at least for authentication.

Hi collimarco,

You totally can! Here are the docs for interacting with the Kube Api with curl examples and here’s a list of client libraries for programatic access to the API (including Ruby!)