Back to Catalog
Cloud
Behavioral
Self Awareness
Enable applications to access their own metadata using the Downward API
Intent & Description
The Self Awareness pattern uses the Kubernetes Downward API to expose pod and container metadata to running applications. Applications can access information about their own pod name, namespace, IP address, resource limits, and other metadata. This enables applications to make decisions based on their runtime context.
Real-world Use Case
Use when applications need to know their own metadata or when you want applications to adapt based on their runtime context.
Advantages
- Enables context-aware applications
- No external service dependency
- Standard Kubernetes mechanism
- Supports dynamic configuration
Disadvantages
- Limited to pod metadata
- Read-only access to most fields
- Requires application changes to use