API operations

Kubernetes API defines the CRUD (create, update, read, and delete) set of operations:

  • Create: Create operations will create the resource in the cluster. The JSON payload that you will need to provide with your REST call is the resource manifest. It's the equivalent of the YAML file we've been constructing in the Chapter 8, Using Kubernetes with Java. This time, it will be in the JSON format.
  • Update: The update operation can be either Replace or Patch. A Replace will simply replace the whole resource object (a Pod, for example) with the provided spec. A Patch, on the other hand, will apply a change only to a specific field.
  • Read: A read operation can be either Get, List, or Watch. By executing Get, you will be given a specific ...

Get Docker and Kubernetes for Java Developers now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.