# Custom-columns not producing comma-separated list

**URL:** <https://discuss.kubernetes.io/t/custom-columns-not-producing-comma-separated-list/12452>\
**Category:** General Discussions\
**Created:** [August 17, 2020, 7:08pm UTC](https://discuss.kubernetes.io/t/custom-columns-not-producing-comma-separated-list/12452 "2020-08-17T19:08:46Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![paulsti](https://avatars.discourse-cdn.com/v4/letter/p/a8b319/32.png) [@paulsti](https://discuss.kubernetes.io/u/paulsti)\
**Post date:** [August 17, 2020, 7:08pm UTC](https://discuss.kubernetes.io/t/custom-columns-not-producing-comma-separated-list/12452/1 "2020-08-17T19:08:46Z")

</div>

When I use -o custom-columns, I get a nice tabular format. But the [documentation](https://kubernetes.io/docs/reference/kubectl/overview/#formatting-output) claims I should get comma-separated values (which is what I want in this case):

```
$ kubectl get statefulsets --all-namespaces -o custom-columns="NAMESPACE:metadata.namespace,NAME:metadata.name,REPLICAS:status.replicas"
NAMESPACE NAME REPLICAS
sample mytest 1

```

etc.

I see that the [test cases in the source code](https://github.com/kubernetes/kubernetes/blob/4d55d1d695225f1e4953feb999616451081b2f6f/staging/src/k8s.io/kubectl/pkg/cmd/get/customcolumn_flags_test.go) only tests showing a single column, so it doesn’t check the output format.

### Cluster information:

Kubernetes version: 1.16.11-gke.5, 1.16.13-gke.1  
Cloud being used: (put bare-metal if not on a public cloud) GKE

---

<div class="post-metadata">

**Author:** ![stephendotcarter](https://sea2.discourse-cdn.com/flex016/user_avatar/discuss.kubernetes.io/stephendotcarter/32/4528_2.png) [@stephendotcarter](https://discuss.kubernetes.io/u/stephendotcarter)\
**Post date:** [August 17, 2020, 7:37pm UTC](https://discuss.kubernetes.io/t/custom-columns-not-producing-comma-separated-list/12452/2 "2020-08-17T19:37:31Z")

</div>

This is from the docs:

```auto
Print a table using a comma separated list of custom columns.

```

I think it’s saying using the following comma separated list of columns, print a table with those columns.  
You may have to output to `json` and use `jq` to get comma separated.

Kind regards,  
Stephen
