Hi All,
I'm Sean O'Gorman, contributing to sig-cli. I've opened PR #134529 1 implementing a kubectl example subcommand (KEP-4146 2) and would appreciate your review when you have a moment.
Quick context: kubectl example deployment generates a clean, immediately-applicable YAML manifest — no more copying from docs and stripping comments. It currently covers 13 resource types including Gateway API, with struct-based generation (no templates) so the output always matches the cluster's API version.
The PR has been open a while and still needs /ok-to-test from an org member before CI can run. If you could take a look, that would be hugely appreciated. I had one comment around driving in #sig-cli with a sponsor, but didn't get time until now to push this. I did incorporate that with these changes:
Key design decisions:
- Struct-based generation using typed Go structs, not templates
- Covers 13 resource types: Pod, Deployment, Service, ConfigMap, Secret, PVC, Job, CronJob, Ingress, NetworkPolicy, CRD, Gateway, HTTPRoute
- Demonstrates the Ingress→Gateway API traffic paradigm shift with comparable examples
- Flags for customization (--name, --image, --replicas, --namespace, --port)
- Clean YAML output with zero-value field stripping
Pushing this as an eager Irish dude on St. Patrick's day, hoping for a bit of luck giving how crazy busy your schedules are.
Happy to address any feedback and would to present this the enhancement as soon as possible.
1
https://github.com/kubernetes/kubernetes/pull/1345292
https://github.com/kubernetes/enhancements/pull/5576Thanks,