8000 Support `kubectl config get-contexts` JSON output · Issue #1614 · kubernetes/kubectl · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Support kubectl config get-contexts JSON output #1614

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
hclihn opened this issue Jun 25, 2024 · 11 comments
Closed

Support kubectl config get-contexts JSON output #1614

hclihn opened this issue Jun 25, 2024 · 11 comments
Assignees
Labels
kind/feature Categorizes issue or PR as related to a new feature. triage/accepted Indicates an issue or PR is ready to be actively worked on.

Comments

@hclihn
Copy link
hclihn commented Jun 25, 2024

What would you like to be added:
Please add support for config get-contexts JSON output.

Why is this needed:
Currently, config get-contexts can only output column-oriented format or the name field (using -o=name). However, when the cluster/context name contains space(s) which is true for our company's implementation, it makes the parsing of the output very challenging. If the command output can support a JSON format, then it's relatively easier to use existing tools to parse it, regardless if the cluster/context name contains space(s) or not.

@hclihn hclihn added the kind/feature Categorizes issue or PR as related to a new feature. label Jun 25, 2024
@k8s-ci-robot k8s-ci-robot added the needs-triage Indicates an issue or PR lacks a `triage/foo` label and requires one. label Jun 25, 2024
@ardaguclu
Copy link
Member

Sounds to me a reasonable ask.

@ah8ad3
Copy link
Member
ah8ad3 commented Jul 4, 2024

I'll take a look at this.

@ardaguclu
Copy link
Member

@ah8ad3 before working on it, I think it would be better to wait bug scrub to triage it first.

@mpuckett159
Copy link
Contributor

/triage accepted

@k8s-ci-robot k8s-ci-robot added triage/accepted Indicates an issue or PR is ready to be actively worked on. and removed needs-triage Indicates an issue or PR lacks a `triage/foo` label and requires one. labels Jul 17, 2024
@TessaIO
Copy link
Member
TessaIO commented Jul 17, 2024

/assign

8000

@karan2704
Copy link

Is this still being worked on? I want to create a PR for this.

@sftim
Copy link
sftim commented Aug 8, 2024

/retitle Support kubectl config get-contexts JSON output

@k8s-ci-robot k8s-ci-robot changed the title Support config get-contexts JSON output Support kubectl config get-contexts JSON output Aug 8, 2024
@tchap
Copy link
Contributor
tchap commented May 23, 2025

I will finish this.

/assign

@tchap
Copy link
Contributor
tchap commented May 28, 2025

This was discussed during SIG-CLI on 5/28, and based on further investigation we agreed that the functionality proposed is already available through:

kubectl config view -o jsonpath='{.contexts}'

@ardaguclu
Copy link
Member

We are not planning to add this functionality for now
/close

@k8s-ci-robot
Copy link
Contributor

@ardaguclu: Closing this issue.

In response to this:

We are not planning to add this functionality for now
/close

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/feature Categorizes issue or PR as related to a new feature. triage/accepted Indicates an issue or PR is ready to be actively worked on.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

9 participants
0