"kubectl list object" as output from jsonnet , what is that?

36 views
Skip to first unread message

Ruben Laguna

unread,
Oct 20, 2023, 4:55:53 AM10/20/23
to Jsonnet
The article https://jsonnet.org/articles/kubernetes.html say 

Use YAML stream output, multi-file output, or a single kubectl list object. This latter option is provided by Kubernetes without requiring any special support from Jsonnet. It allows us to group several Kubernetes objects into a single object. This is the most popular option because it does not require intermediate files, and other tools don't always reliably support YAML streams.

I never heard of a "kubectl list object",  and if you google for "kubectl list object" there is only 3 results. 

what is a single kubectl list object in this context?

Ruben Laguna

unread,
Oct 20, 2023, 8:32:46 AM10/20/23
to Jsonnet
https://devops.stackexchange.com/a/18441/42223

The are referring to a list resource/ list object, that is a kubectl client-side feature only (kubernetes api does not have a kind: List), so they call it  "kubectl  list object" to emphasize that is kubectl-only feature not Kubernetes. 

```
apiVersion: v1
kind: List
items:
- apiVersion: v1
  kind: Pod
  ...
- apiVersion: v1
  kind: ConfigMap
```


Reply all
Reply to author
Forward
0 new messages