diff --git a/go.mod b/go.mod index b610e1581..e5c9aee28 100644 --- a/go.mod +++ b/go.mod @@ -29,10 +29,10 @@ require ( golang.org/x/sys v0.20.0 gopkg.in/evanphx/json-patch.v4 v4.12.0 gopkg.in/yaml.v2 v2.4.0 - k8s.io/api v0.0.0-20240529203521-42619825cf01 + k8s.io/api v0.0.0-20240529224029-d93eaf6729fd k8s.io/apimachinery v0.0.0-20240529203233-63ab494c70e6 k8s.io/cli-runtime v0.0.0-20240529211226-0677a9daf7c7 - k8s.io/client-go v0.0.0-20240529203923-e8b54718d08b + k8s.io/client-go v0.0.0-20240530003920-d81b8f64920e k8s.io/component-base v0.0.0-20240529204824-47eccf3754e9 k8s.io/component-helpers v0.0.0-20240529205005-770b241b63e8 k8s.io/klog/v2 v2.120.1 @@ -93,3 +93,5 @@ require ( gopkg.in/yaml.v3 v3.0.1 // indirect sigs.k8s.io/kustomize/api v0.17.2 // indirect ) + +replace k8s.io/code-generator => k8s.io/code-generator v0.0.0-20240529204622-620b11395a95 diff --git a/go.sum b/go.sum index 979918afc..f26a4145e 100644 --- a/go.sum +++ b/go.sum @@ -273,14 +273,14 @@ gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= honnef.co/go/tools v0.0.0-20190102054323-c2f93a96b099/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= honnef.co/go/tools v0.0.0-20190523083050-ea95bdfd59fc/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= -k8s.io/api v0.0.0-20240529203521-42619825cf01 h1:174qeH6d5KbPVqH3AiRwaPF3KLywgsXd3Urb8fB/brY= -k8s.io/api v0.0.0-20240529203521-42619825cf01/go.mod h1:4/2Gq0qr5DtTHoaH7lfOKW6+ZMSOJwvVvbojJlldJh8= +k8s.io/api v0.0.0-20240529224029-d93eaf6729fd h1:voEDf2CuLj5eRTo2rz2qNJwYUP9aPfOZy21SA++W71Q= +k8s.io/api v0.0.0-20240529224029-d93eaf6729fd/go.mod h1:4/2Gq0qr5DtTHoaH7lfOKW6+ZMSOJwvVvbojJlldJh8= k8s.io/apimachinery v0.0.0-20240529203233-63ab494c70e6 h1:MyOUvhoFRNxMeVhvXMui7xb2huAQiys6tlcNBzvPSb8= k8s.io/apimachinery v0.0.0-20240529203233-63ab494c70e6/go.mod h1:ClkKrTMwhmMjgsEHpX2w3F+YKj0ctDOaAxqL7clxG0U= k8s.io/cli-runtime v0.0.0-20240529211226-0677a9daf7c7 h1:d4BNDmOFmzw76gRv8Xk310uqdUTaGf8MzAsGPYZ+RQk= k8s.io/cli-runtime v0.0.0-20240529211226-0677a9daf7c7/go.mod h1:At8HhPcC4Lprs3TQ1ipBbLA9c9CBje9cZ2dOUuzqeyA= -k8s.io/client-go v0.0.0-20240529203923-e8b54718d08b h1:qhZGeiglpnSBZjcG8r5pLBL55ZeYvOW1EIQ2Mmr7wIY= -k8s.io/client-go v0.0.0-20240529203923-e8b54718d08b/go.mod h1:TpMNNAKUYHV0buGou2BBk16mMkWIWFlYvl9i+5SB5tI= +k8s.io/client-go v0.0.0-20240530003920-d81b8f64920e h1:H5FPEWbIq8RIRF5Zpm9JgL9Lw5p3h96W8xmXSahiPCE= +k8s.io/client-go v0.0.0-20240530003920-d81b8f64920e/go.mod h1:CEemKW7WE6FdlIOXIObVMHqUKvnlcRLnmp9eBmgUQJY= k8s.io/component-base v0.0.0-20240529204824-47eccf3754e9 h1:8b7QWPbMuhtGUvrQP8/Qy+qZCObC4kgyruMwJr2dPv4= k8s.io/component-base v0.0.0-20240529204824-47eccf3754e9/go.mod h1:xq8Vemf3NxQvJTNuYgjx3lCurjF1a5ND//cvSr+CGCs= k8s.io/component-helpers v0.0.0-20240529205005-770b241b63e8 h1:7RERLzwpDZ/b1v29HSL5YAi+ufRXwHG3e50KH80Cafk= diff --git a/pkg/cmd/get/get.go b/pkg/cmd/get/get.go index 063fd3d94..a1bc13cb1 100644 --- a/pkg/cmd/get/get.go +++ b/pkg/cmd/get/get.go @@ -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 the current + namespace if you don't specify any namespace. 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.`)) @@ -132,7 +132,13 @@ var ( kubectl get rc/web service/frontend pods/web-pod-13je7 # 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 (