Liu created FLINK-39021:
---------------------------
Summary: Support native PersistentVolumeClaim (PVC) mounting for
Kubernetes deployments
Key: FLINK-39021
URL: https://issues.apache.org/jira/browse/FLINK-39021
Project: Flink
Issue Type: Improvement
Components: Deployment / Kubernetes
Reporter: Liu
h1. Motivation
Currently, Flink on Kubernetes users who want to mount PersistentVolumeClaims
(PVCs) to their JobManager and TaskManager pods have to use Pod Templates.
While Pod Templates are flexible, they require users to maintain separate YAML
files and understand Kubernetes Pod specification details, which increases
operational complexity.
This proposal introduces native configuration options for mounting PVCs
directly through Flink configuration, providing a simpler and more intuitive
way for users to attach persistent storage to their Flink clusters.
h1. Use Cases
# Checkpoint/Savepoint Storage: Mount a shared PVC for storing checkpoints and
savepoints, enabling high availability and disaster recovery.
# Shared Data Access: Mount read-only PVCs containing shared datasets or
configuration files that multiple pods need to access.
# Log Persistence: Mount PVCs to persist logs beyond pod lifecycle for
debugging and auditing.
# State Backend Storage: Use mounted PVCs as storage for RocksDB state backend
in scenarios where local SSD is required.
h1. Proposed Changes
| Configuration Key | Type | Default | Description |
|-------------------|------|---------|-------------|
| `kubernetes.persistent-volume-claims` | Map<String, String> | (none) | PVCs
and their mount paths in format `pvc-name:/mount/path` |
| `kubernetes.persistent-volume-claims.read-only` | Boolean | false | Whether
to mount PVCs as read-only |
{code:java}
# Mount a single PVC for checkpoint storage
kubernetes.persistent-volume-claims: checkpoint-pvc:/opt/flink/checkpoints
# Mount multiple PVCs
kubernetes.persistent-volume-claims:
checkpoint-pvc:/opt/flink/checkpoints,data-pvc:/opt/flink/data
# Mount PVCs as read-only (for shared data)
kubernetes.persistent-volume-claims: shared-data:/opt/flink/shared
kubernetes.persistent-volume-claims.read-only: true {code}
--
This message was sent by Atlassian Jira
(v8.20.10#820010)