Skip to main content

Pod

A Pod is the smallest and simplest Kubernetes object. It represents a set of running containers on your cluster. A Pod encapsulates an application composed of multiple co-located containers that are tightly coupled in terms of their resource requirements and scheduling. For more information, please refer to the official Kubernetes documentation.

Terraform Mappings:

  • kubernetes_pod.metadata[0].name
  • kubernetes_pod_v1.metadata[0].name

Supported Methods

  • GET: Get a Pod by name
  • LIST: List all Pods
  • SEARCH: Search for a Pod using the ListOptions JSON format e.g. ("labelSelector": "app=wordpress")

ConfigMap

A Pod can reference a ConfigMap to retrieve configuration data and make it available to the application running within the Pod. This allows for dynamic configuration without modifying the container image.

ec2-volume

In environments where Kubernetes is hosted on AWS, a Pod may use an EC2 volume to persist data. This is typically achieved via a PersistentVolume that specifies the use of an EC2 volume as the underlying storage resource.

dns

Pods may introduce DNS entries within the cluster which are utilized for service discovery. The cluster DNS server automatically assigns DNS names to Pods and Services.

ip

Each Pod is assigned a unique IP address. This IP address enables communication with other Pods within the cluster. Pods can be accessed via their IP when performing intra-cluster networking.

PersistentVolumeClaim

A Pod can use a PersistentVolumeClaim to request specific storage resources. This allows the Pod to access persistent storage volume types supported by the cluster, ensuring data remains available across Pod restarts.

PriorityClass

Pods can be associated with a PriorityClass that determines their scheduling priority. Higher priority Pods are favoured in situations where resources are limited, impacting the order in which Pods are scheduled.

Secret

Pods can access sensitive information, such as passwords and tokens, from Secrets. This information can be mounted as files or made available as environment variables within the containers.

ServiceAccount

A Pod can run with specific ServiceAccount credentials to access the Kubernetes API or other external resources. By default, Pods are assigned the default ServiceAccount unless specified otherwise.