In the context of the k8s api, the term “Resources” is abused and in most cases it’s used as a synonym to the term “Object”. This brings confusion, so I will try to clear things out.

What are Resources?

The term “resource” comes from API Terminology. It is an asset on a server that an entity (user, program, etc.) could access through an API endpoint.

However, there are some nuances when it comes to Kubernetes parlance.

Resource Types

The k8s API extends the general API terminology by introducing resource types.

Here is the definition, straight from the Kubernetes API Terminology:

resource type is the name used in the URL (podsnamespacesservices1)

Here is an example endpoint: api/v1/pods.

Resource types have concrete representation called kind (see k8s kind field). Furthermore, a list of instances of a resource type is known as a collection.

IMPORTANT

A Collection is an API endpoint that represents a list of resources of the same type (Kind).

Resource Instances

A single instance of a resource type is called a resource, and also usually represents an object

Note that singular resources are also known as Elements.

IMPORTANT

An Element is an API endpoint that represents an individual resource.

Footnotes

  1. To understand what lies beyond the URL (what is a Pod in the context of the k8s API), see k8s objects.