-
Notifications
You must be signed in to change notification settings - Fork 38.7k
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
Improving kubectl get output #123440
Improving kubectl get output #123440
Conversation
8162535
to
6802f8a
Compare
/sig cli |
@@ -92,7 +92,7 @@ var ( | |||
Prints a table of the most important information about the specified resources. | |||
You can filter the list using a label selector and the --selector flag. If the | |||
desired resource type is namespaced you will only see results in your current | |||
namespace unless you pass --all-namespaces. | |||
namespace unless you pass --all-namespaces or --namespace(for specific namespace) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What about?
namespace unless you pass --all-namespaces or --namespace(for specific namespace) | |
namespace by passing --namespace(for specific namespace) unless you pass --all-namespaces. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The whole sentence doesnt make sense then.
how about
If the desired resource type is namespaced you will only see results in your current namespace unless you pass --namespace or --all-namespaces.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
or better..
If the desired resource type is namespaced you will only see results in other namespaces by passing --namespace(for specific namespace) or --all-namespaces.
kubectl get deployments.apps --namespace backend | ||
|
||
# List all pods existing in all namespaces | ||
kubectl get pods --all-namspaces`)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
kubectl get pods --all-namspaces`)) | |
kubectl get pods --all-namespaces`)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
oh!! how did i miss that.
kubectl get pod web-pod-13je7 --subresource status`)) | ||
kubectl get pod web-pod-13je7 --subresource status | ||
|
||
# List all deployments in namespace - backend |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
# List all deployments in namespace - backend | |
# List all deployments in namespace 'backend' |
/kind cleanup |
6802f8a
to
e307621
Compare
Made some changes PTAL @ardaguclu |
@@ -91,8 +91,8 @@ var ( | |||
|
|||
Prints a table of the most important information about the specified resources. | |||
You can filter the list using a label selector and the --selector flag. If the | |||
desired resource type is namespaced you will only see results in your current | |||
namespace unless you pass --all-namespaces. | |||
desired resource type is namespaced you will only see results in other namespaces |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
or current namespace if user doesn't specify none of them?
/easycla |
Hi , is there anything to add in this PR as the PR is awaiting reviews from long. |
This https://github.com/kubernetes/kubernetes/pull/123440/files#r1502075458 comment hasn't been resolved yet. |
Adding namespace flag & examples Signed-off-by: Ritikaa96 <ritika@india.nec.com>
Signed-off-by: Ritikaa96 <ritika@india.nec.com>
Signed-off-by: Ritikaa96 <ritika@india.nec.com>
e307621
to
b9ec8b3
Compare
Hi @ardaguclu I have made some changes. PTAL. Does it look good or i should make another change? |
Thank you |
LGTM label has been added. Git tree hash: 207a2efea30bed8048287727d7814ce7c1a3300c
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: ardaguclu, Ritikaa96 The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
this is only doc change; |
/retest |
The Kubernetes project has merge-blocking tests that are currently too flaky to consistently pass. This bot retests PRs for certain kubernetes repos according to the following rules:
You can:
/retest |
Seems like all the test have passed . Waiting for @dims review . |
Signed-off-by: Ritikaa96 <ritika@india.nec.com
What this PR does / why we need it:
Adding namespace flag & examples
kubectl get --help states the following even though we can use --namespace to get details for other namespace resources.
The description should mention
--namespace
as this can show objects/resources from different namespace as wellWhich issue(s) this PR fixes:
Fixes #kubernetes/kubectl#1555
Special notes for your reviewer:
Does this PR introduce a user-facing change?
NONE
Does this PR introduce a user-facing change?
NONE
Additional documentation e.g., KEPs (Kubernetes Enhancement Proposals), usage docs, etc.:
NONE