mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-08-01 07:47:56 +00:00
Merge pull request #123440 from Ritikaa96/kubectl-improve-get
Improving kubectl get output
This commit is contained in:
commit
36f1d73c1f
@ -91,8 +91,8 @@ var (
|
|||||||
|
|
||||||
Prints a table of the most important information about the specified resources.
|
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
|
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
|
desired resource type is namespaced you will only see results in the current
|
||||||
namespace unless you pass --all-namespaces.
|
namespace if you don't specify any namespace.
|
||||||
|
|
||||||
By specifying the output as 'template' and providing a Go template as the value
|
By specifying the output as 'template' and providing a Go template as the value
|
||||||
of the --template flag, you can filter the attributes of the fetched resources.`))
|
of the --template flag, you can filter the attributes of the fetched resources.`))
|
||||||
@ -132,7 +132,13 @@ var (
|
|||||||
kubectl get rc/web service/frontend pods/web-pod-13je7
|
kubectl get rc/web service/frontend pods/web-pod-13je7
|
||||||
|
|
||||||
# List the 'status' subresource for a single pod
|
# List the 'status' subresource for a single pod
|
||||||
kubectl get pod web-pod-13je7 --subresource status`))
|
kubectl get pod web-pod-13je7 --subresource status
|
||||||
|
|
||||||
|
# List all deployments in namespace 'backend'
|
||||||
|
kubectl get deployments.apps --namespace backend
|
||||||
|
|
||||||
|
# List all pods existing in all namespaces
|
||||||
|
kubectl get pods --all-namespaces`))
|
||||||
)
|
)
|
||||||
|
|
||||||
const (
|
const (
|
||||||
|
Loading…
Reference in New Issue
Block a user