Resource

115

A resource is an endpoint in the Kubernetes API that stores a collection of API objects of a certain kind; for example, the built-in pods resource contains a collection of Pod objects.

Stuff you wanna know:

  1. When you specify a Pod, you can specify how much of each resource a container needs.
  2. The most common resources to specify are CPU and memory (RAM).
  3. When you specify the resource request for containers in a Pod, the kube-scheduler uses this information to decide which node to place the Pod on.
  4. If the node where a Pod is running has enough of a resource available, it’s possible (and allowed) for a container to use more resource than its request for that resource specifies. However, a container is not allowed to use more than its resource limit.
  5. CPU and memory are collectively referred to as compute resources, or resources. Compute resources are measurable quantities that can be requested, allocated, and consumed.
  6. API resources, such as Pods and Services are objects that can be read and modified through the Kubernetes API server.
  7. For a particular resource, a Pod resource request/limit is the sum of the resource requests/limits of that type for each container in the Pod.
  8. When the kubelet starts a container as part of a Pod, the kubelet passes that container’s requests and limits for memory and CPU to the container runtime.
  9. The kubelet reports the resource usage of a Pod as part of the Pod status.

More stuff: