Split a multi-document YAML stream into separately serialized documents.
The frame below runs the same code as this page, in the reader's own browser. Nothing is sent to us, and nothing is sent to you.
Pick a dark background and the text and panels follow it, so the frame stays readable on a dark page.
The input is parsed at standard --- document markers, each YAML value is serialized independently, and the count reports how many stream items were found. Empty marker sections follow parser null-document behavior.
---
apiVersion: v1
kind: Service
metadata:
name: web
spec:
ports:
- port: 80
---
apiVersion: apps/v1
kind: Deployment
metadata:
name: web
spec:
replicas: 2
Documents: apiVersion: v1
kind: Service
metadata:
name: web
spec:
ports:
- port: 80
, apiVersion: apps/v1
kind: Deployment
metadata:
name: web
spec:
replicas: 2
Count: 2
kubectl manifests, deployment bundles, and sequential YAML streams split documents.