Skip to main content

Kubernetes Resources

In Kubernetes, resources are like building blocks used to create and manage your cluster. Each resource is an object with metadata (such as names and labels) and a desired state that defines its behavior. All objects in Kubernetes are managed by an API and stored in the etcd database.

For example, a Pod resource defines how to run a group of containers, while a Service resource manages network access to those containers. Everything you can manage with kubectl or the Kubernetes API - like workloads, storage, or configuration - is a resource, making them essential for defining and controlling your cluster's behavior.

The following command lists all the resources that can be managed in a Kubernetes cluster, including their names, short names, API versions, and whether they are namespaced:

kubectl api-resources

The most relevant resources for the KCNA exam are marked red

Resource Overview

Core Resources

  • Pod
  • Service
  • ConfigMap
  • Secret
  • Namespace
  • PersistentVolume
  • PersistentVolumeClaim
  • ServiceAccount
  • Binding
  • ComponentStatus
  • Endpoints
  • Event
  • LimitRange
  • PodTemplate
  • ReplicationController
  • ResourceQuota

Workloads

  • Deployment
  • ReplicaSet
  • DaemonSet
  • StatefulSet
  • CronJob
  • Job
  • ControllerRevision

Networking

  • Ingress
  • NetworkPolicy
  • IngressClass

RBAC (Role-Based Access Control)

  • Role
  • RoleBinding
  • ClusterRole
  • ClusterRoleBinding

Storage

  • StorageClass
  • CSIDriver
  • CSINode
  • CSIStorageCapacity
  • VolumeAttachment

Admission Control

  • MutatingWebhookConfiguration
  • ValidatingWebhookConfiguration

API Extensions

  • CustomResourceDefinition
  • APIService

Authentication and Authorization

  • TokenReview
  • LocalSubjectAccessReview
  • SelfSubjectAccessReview
  • SelfSubjectRulesReview
  • SubjectAccessReview

Autoscaling

  • HorizontalPodAutoscaler

Certificates

  • CertificateSigningRequest

Coordination

  • Lease

Discovery

  • EndpointSlice

Events

  • Event

Flow Control

  • FlowSchema
  • PriorityLevelConfiguration

Node Management

  • RuntimeClass

Policies

  • PodDisruptionBudget
  • PodSecurityPolicy

Scheduling

  • PriorityClass



Resource Description


pod-128.pngIn Kubernetes, a Pod is the smallest and most basic unit you work with. It can hold one or more containers that share resources like storage, networking, and computing power. Even though a Pod can have multiple containers, they always run together as a single unit on a node in the cluster.
pod-128.pngIn Kubernetes, a Pod is the smallest and most basic unit you work with. It can hold one or more containers that share resources like storage, networking, and computing power. Even though a Pod can have multiple containers, they always run together as a single unit on a node in the cluster.
pod-128.pngIn Kubernetes, a Pod is the smallest and most basic unit you work with. It can hold one or more containers that share resources like storage, networking, and computing power. Even though a Pod can have multiple containers, they always run together as a single unit on a node in the cluster.
<tr>
    <td colspan="2" style="text-align: center; border: 1px solid #ddd; padding: 10px;"> <img
            src="https://via.placeholder.com/600x300.png?text=Pod+Architecture" alt="Pod Architecture Diagram"
            style="max-width: 100%; height: auto;" /> </td>
</tr>
<tr>
    <td colspan="2" style="text-align: left; border: 1px solid #ddd; padding: 10px;"> <b>Detailed Description:</b>
        <p>A Pod is the smallest deployable unit in Kubernetes and serves as the basic building block for running
            applications in the cluster. Each Pod encapsulates one or more containers, which share the same
            resources such as storage, networking, and compute. Containers within a Pod are tightly coupled, meaning
            they always run together on the same node and share the same network namespace, allowing them to
            communicate with each other using `localhost`.</p>
        <p>Typically, a Pod has a single container, but it can host sidecar containers that assist the main
            application container with additional tasks like logging, monitoring, or proxying requests. Pods are
            ephemeral by nature, designed to be replaceable and scaled according to workload demands through
            higher-level Kubernetes abstractions like Deployments or StatefulSets.</p>
        <p>Key characteristics of Pods include:</p>
        <ul>
            <li><b>Shared Networking:</b> All containers in a Pod share the same IP address and port space.</li>
            <li><b>Shared Storage:</b> Volumes attached to a Pod are shared among all its containers.</li>
            <li><b>Lifecycle Management:</b> Pods are managed by controllers like Deployments, ReplicaSets, and
                DaemonSets to ensure desired state is maintained.</li>
        </ul>
    </td>
</tr>
 Pod Icon  
  • Kubernetes Official Documentation
  • Cloud Native Computing Foundation
  • Kubernetes Tutorials