Show HN: Kubernetes Spec Explorer
216 points| goenning | 1 year ago |kubespec.dev
A few things included:
- Tree view with schema, type and description of all native resources - History changes since version X (properties added/removed/modified) - Examples of some resources that you can easily copy as a starting point - Supports all versions since X, including the newly released 1.32 - I also want to add support for popular CRD, but I’m not sure how I’ll do that yet, I’m open to suggestions!
Everything is auto generated based on the OpenAPI spec, with some manual inputs for examples and external links.
Hope you like it and if there’s anything else you think it could be useful just let me know.
abuckenheimer|1 year ago
Maybe one nitpick would be to keep colon between the key and the type so one can copy paste multiple lines of relevant spec to be filled in your editor easily.
Xeago|1 year ago
In my opinion, it comes with better navigation, safe to open in new tabs to drill-deep and unwind when done, much better use of horizontal space. Even though it is generated, I looks to have much of the exact same text?
fsniper|1 year ago
emmanueloga_|1 year ago
* Go types are converted to Protobuf via go-to-protobuf.
* Protobuf generates OpenAPI specs and JSONSchemas via kube-openapi.
* Users rely on tools and DSLs to manage the complexity of YAML manifests.
This pipeline prioritizes some convenience for the core team over simplicity for end users. In the end, that minimal convenience transmutes into layers of convoluted code generators to maintain for the core team, and unwieldy, tens-of-thousands-of-lines schemas for the end users.
Also, does Kubernetes really benefit enough from Protobuf to justify the complexity? k8s IPC and network traffic likely account for a small fraction of overall app traffic. Perhaps JSON and schemas for validation could be enough.
The proliferation of tools to manage YAML manifests is a sign of room for improvement. Perhaps a "k8s 2.0" could start with JSONSchemas: this could encourage minimal, flat, simple, and user-friendly schemas, and hopefully a more coherent internal pipeline.
jbendotnet21|1 year ago
joushx|1 year ago
goenning|1 year ago
leg100|1 year ago
Perhaps add an "expand all" button to avoid clicking individually on properties to see their descriptions?
I usually rely on the official generated docs (all on one giant page):
https://kubernetes.io/docs/reference/generated/kubernetes-ap...
fikama|1 year ago
robinhoodexe|1 year ago
Adding support for CRDs would be very nice. Maybe look up popular CNCF projects and find their official helm charts, that contain the CRDs?
jzelinskie|1 year ago
vbezhenar|1 year ago
https://kubespec.dev/apps/v1/Deployment https://kubernetes.io/docs/reference/kubernetes-api/workload...
vs I'm very nitpicky about order of fields and I always follow kubernetes documentation order. Not sure where it really comes from, but generally it's good enough and better than alphabetical order (or inconsistent order).mdaniel|1 year ago
It's almost certainly from the golang struct https://github.com/kubernetes/api/blob/v0.32.0/apps/v1/types... or its more succinct generated.proto friend https://github.com/kubernetes/api/blob/v0.32.0/apps/v1/gener...
and, as you pointed out, the .dev one appears to just be alphabetical. In their defense, I would guess for humans that are looking for "paused" it's much easier to scan down to the "mnop" area and then look for "paused" than, lol, guess where the paused was introduced in the timeline of a golang struct
unknown|1 year ago
[deleted]
hintymad|1 year ago
thrw42A8N|1 year ago
Start with Minikube on Ubuntu via Snap if you want the really easy way. Deploy that on Hetzner or something using Cloud-init. Auto cluster discovery is a job for one evening. I like to use Pulumi or Terraform to see what I can play with on a cloud provider and operate it in a sane way.
And I use the K8s provider too: https://registry.terraform.io/providers/hashicorp/kubernetes...
Atotalnoob|1 year ago
If you matched k8s features 1:1, you’d end up with a massive unwieldy beast, much more complex than k8s.
Is k8s complex? Yes, of course.
keisku|1 year ago
https://github.com/keisku/kubectl-explore
imcritic|1 year ago
JohnMakin|1 year ago
astonex|1 year ago
wpm|1 year ago
mdaniel|1 year ago
This also has a UX implication because let's say one wished to know what values could go into envFrom[].fieldRef.fieldPath so they click on fieldPath to expand that node. It says, unhelpfully, "Path of the field to select in the specified API version." and then they go on HN to bitch about how complicated kubernetes is. When in reality they wanted to click on "fieldRef" itself, which coughs up "Selects a field of the pod: supports metadata.name, metadata.namespace, `metadata.labels['<KEY>']`, `metadata.annotations['<KEY>']`, spec.nodeName, spec.serviceAccountName, status.hostIP, status.podIP, status.podIPs." but only if you knew to click on it
Contrast that with https://kubernetes.io/docs/reference/generated/kubernetes-ap... (which, yes, takes 500 million years to load but works)
elliot07|1 year ago
JeffMcCune|1 year ago
nosefrog|1 year ago
lormayna|1 year ago
swills|1 year ago
pythops|1 year ago
devops99|1 year ago