Skip to content

docs(examples): add yaml_dir sample manifests guide and usage reference - #2815

Open
anisayakmitra-in wants to merge 1 commit into
kubernetes-client:masterfrom
anisayakmitra-in:docs-yaml-dir-guide
Open

anisayakmitra-in wants to merge 1 commit into
kubernetes-client:masterfrom
anisayakmitra-in:docs-yaml-dir-guide

Conversation

@anisayakmitra-in

Copy link
Copy Markdown
Contributor

What type of PR is this?

/kind documentation

What this PR does / why we need it:

examples/yaml_dir contains 5 sample Kubernetes manifests (config_map.yml, configmap-demo-pod.yml, nginx-deployment.yaml, pi-job.yaml, and pod.yml) used across multiple creation and apply example scripts, but lacked a directory README.md introducing the manifests and explaining how to use them with the client.

This PR adds examples/yaml_dir/README.md with:

  • An overview and index of all 5 available sample manifests (ConfigMap, Pod with ConfigMap mounts, Deployment, Job, and Pod).
  • Python code examples illustrating how to apply individual manifests with kubernetes.utils.create_from_yaml.
  • Python code examples illustrating how to apply an entire directory with kubernetes.utils.create_from_directory.
  • Python code examples illustrating how to parse YAML with yaml.safe_load and deploy via typed client APIs (e.g. AppsV1Api.create_namespaced_deployment).
  • Cross-references to the root examples/README.md, dynamic-client/README.md, and watch/README.md.

Which issue(s) this PR fixes:

N/A

Special notes for your reviewer:

None

Does this PR introduce a user-facing change?

NONE

Additional documentation e.g., KEPs (Kubernetes Enhancement Proposals), usage docs, etc.:

None

Signed-off-by: ANISAYAK MITRA <266799942+anisayakmitra-in@users.noreply.github.com>
@kubernetes-prow kubernetes-prow Bot added release-note-none Denotes a PR that doesn't merit a release note. kind/documentation Categorizes issue or PR as related to documentation. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. labels Nov 28, 2026
@kubernetes-prow
kubernetes-prow Bot requested review from roycaihw and yliaog November 28, 2026 04:38
@kubernetes-prow

Copy link
Copy Markdown
Contributor

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: anisayakmitra-in
Once this PR has been reviewed and has the lgtm label, please assign yliaog for approval. For more information see the Code Review Process.

The full list of commands accepted by this bot can be found here.

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@kubernetes-prow kubernetes-prow Bot added the size/M Denotes a PR that changes 30-99 lines, ignoring generated files. label Nov 28, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. kind/documentation Categorizes issue or PR as related to documentation. release-note-none Denotes a PR that doesn't merit a release note. size/M Denotes a PR that changes 30-99 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant