kubernetes/pkg/kubectl
Kubernetes Submit Queue aedeccda95 Merge pull request #28352 from vefimova/fix_22986-1
Automatic merge from submit-queue

Added warning msg for `kubectl get`

- added warning description regarding terminated pods to `get` long help message
  - added printing of warning message in case of `get pods` if there are hidden pods

Fixes #22986  (initiall PR and discussion are here #26417)

## **Output examples:**
### # kubectl get pods
```
NAME                       READY     STATUS             RESTARTS   AGE
dapi-test-pod1             0/1       Terminating        0          22h
liveness-http              0/1       CrashLoopBackOff   11245      22d
ubuntu1-1206318548-oh9tc   0/1       CrashLoopBackOff   2336       8d
  info: 1 completed object(s) was(were) not shown in pods list. Pass --show-all to see all objects.

```

### #  kubectl get pods,namespaces
```
NAME                          READY     STATUS             RESTARTS   AGE
po/dapi-test-pod1             0/1       Terminating        0          22h
po/liveness-http              1/1       Running            11242      22d
po/ubuntu1-1206318548-oh9tc   0/1       CrashLoopBackOff   2335       8d
 info: 1 completed object(s) was(were) not shown in pods list. Pass --show-all to see all objects.

NAME             STATUS    AGE
ns/default       Active    89d
ns/kube-system   Active    41d
```

### # kubectl get pods -a
```
NAME                       READY     STATUS             RESTARTS   AGE
busybox                    0/1       Error              0          27d
dapi-test-pod1             0/1       Terminating        0          22h
liveness-http              0/1       CrashLoopBackOff   11245      22d
ubuntu1-1206318548-oh9tc   0/1       CrashLoopBackOff   2336       8d
```

### # kubectl get -h
```
Display one or many resources.

Possible resource types include (case insensitive): pods (aka 'po'), services (aka 'svc'), deployments (aka 'deploy'),
replicasets (aka 'rs'), replicationcontrollers (aka 'rc'), nodes (aka 'no'), events (aka 'ev'), limitranges (aka 'limits'),
persistentvolumes (aka 'pv'), persistentvolumeclaims (aka 'pvc'), resourcequotas (aka 'quota'), namespaces (aka 'ns'),
serviceaccounts (aka 'sa'), ingresses (aka 'ing'), horizontalpodautoscalers (aka 'hpa'), daemonsets (aka 'ds'), configmaps (aka 'cm'),
componentstatuses (aka 'cs), endpoints (aka 'ep'), petsets (alpha feature, may be unstable) and secrets.

This command will hide resources that have completed. For instance, pods that are in the Succeeded or Failed phases.
You can see the full results for any resource by providing the '--show-all' flag.

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 resource(s).

Examples:

.........
````
2016-08-17 05:11:50 -07:00
..
cmd Merge pull request #28352 from vefimova/fix_22986-1 2016-08-17 05:11:50 -07:00
metricsutil Implement kubectl top command with subcommands. 2016-08-11 17:25:18 +02:00
resource Merge pull request #29500 from lixiaobing10051267/masterFound 2016-08-03 20:05:15 -07:00
testing Update generated files due to dependency shift. 2016-08-09 10:41:09 -05:00
apply.go Remove "All rights reserved" from all the headers. 2016-06-29 17:47:36 -07:00
autoscale.go Remove "All rights reserved" from all the headers. 2016-06-29 17:47:36 -07:00
bash_comp_utils.go Remove "All rights reserved" from all the headers. 2016-06-29 17:47:36 -07:00
configmap_test.go Remove "All rights reserved" from all the headers. 2016-06-29 17:47:36 -07:00
configmap.go Move IsSecretKey into util/validation 2016-07-03 02:19:09 -07:00
custom_column_printer_test.go 24133 fix: --no-headers works with custom columns now 2016-07-07 10:04:09 +02:00
custom_column_printer.go Added warning msg for kubectl get 2016-08-15 22:49:37 +00:00
deployment_test.go Add "create deployment" sub-command 2016-08-08 13:24:30 +10:00
deployment.go Add "create deployment" sub-command 2016-08-08 13:24:30 +10:00
describe_test.go Display pod tolerations with kubectl describe pod. 2016-08-11 12:52:50 -04:00
describe.go add a certificate signing request resource printer in kubectl 2016-08-15 09:57:17 -07:00
doc.go Use Go canonical import paths 2016-07-16 13:48:21 -04:00
explain.go Remove "All rights reserved" from all the headers. 2016-06-29 17:47:36 -07:00
generate_test.go Remove "All rights reserved" from all the headers. 2016-06-29 17:47:36 -07:00
generate.go Remove "All rights reserved" from all the headers. 2016-06-29 17:47:36 -07:00
history.go kubectl: refactor rollout history to be more configurable 2016-07-12 10:36:14 +02:00
interfaces.go Remove "All rights reserved" from all the headers. 2016-06-29 17:47:36 -07:00
kubectl_test.go Remove "All rights reserved" from all the headers. 2016-06-29 17:47:36 -07:00
kubectl.go add shortname for certificate signing request 2016-08-05 14:17:14 -07:00
namespace_test.go Fix namespace_test error message 2016-08-08 12:08:57 +10:00
namespace.go Remove "All rights reserved" from all the headers. 2016-06-29 17:47:36 -07:00
OWNERS Remove bgrant from pkg/OWNERS and pkg/kubectl/OWNERS since he has plenty to do. 2016-06-16 08:21:27 -07:00
proxy_server_test.go Make "attach" and "exec" rejection in proxy more explicit 2016-07-19 20:50:19 +02:00
proxy_server.go Fix various typos in kubectl 2016-08-02 19:51:51 +03:00
quota_test.go Add --scopes to kubectl-create-quota and add tests 2016-07-26 14:12:35 +02:00
quota.go Add --scopes to kubectl-create-quota and add tests 2016-07-26 14:12:35 +02:00
resource_printer_test.go Added warning msg for kubectl get 2016-08-15 22:49:37 +00:00
resource_printer.go Merge pull request #28352 from vefimova/fix_22986-1 2016-08-17 05:11:50 -07:00
rollback.go Move deployment utilities to there own package 2016-07-08 09:46:56 +02:00
rolling_updater_test.go Merge pull request #29971 from caesarxuchao/fix-kubectl-rolling-update-with-gc 2016-08-04 20:48:10 -07:00
rolling_updater.go make correction to two variables in inverse order 2016-08-05 16:17:01 +08:00
rollout_status.go Remove "All rights reserved" from all the headers. 2016-06-29 17:47:36 -07:00
run_test.go Allow empty value for env in kubectl run 2016-08-05 08:47:53 -04:00
run.go Allow empty value for env in kubectl run 2016-08-05 08:47:53 -04:00
scale_test.go Merge pull request #27048 from kargakis/ignore-only-409-in-scaler 2016-07-02 21:28:37 -07:00
scale.go speed up RC scaler 2016-08-12 08:19:10 -04:00
secret_for_docker_registry_test.go Remove "All rights reserved" from all the headers. 2016-06-29 17:47:36 -07:00
secret_for_docker_registry.go Remove "All rights reserved" from all the headers. 2016-06-29 17:47:36 -07:00
secret_for_tls_test.go Remove "All rights reserved" from all the headers. 2016-06-29 17:47:36 -07:00
secret_for_tls.go Remove "All rights reserved" from all the headers. 2016-06-29 17:47:36 -07:00
secret_test.go Remove "All rights reserved" from all the headers. 2016-06-29 17:47:36 -07:00
secret.go Move IsSecretKey into util/validation 2016-07-03 02:19:09 -07:00
service_basic_test.go Add "create service" sub-commands 2016-08-08 12:31:21 +10:00
service_basic.go Add "create service" sub-commands 2016-08-08 12:31:21 +10:00
service_test.go Merge pull request #28239 from ApsOps/kubectl-expose-headless-svc 2016-08-02 01:18:19 -07:00
service.go Merge pull request #28239 from ApsOps/kubectl-expose-headless-svc 2016-08-02 01:18:19 -07:00
serviceaccount_test.go Remove "All rights reserved" from all the headers. 2016-06-29 17:47:36 -07:00
serviceaccount.go Remove "All rights reserved" from all the headers. 2016-06-29 17:47:36 -07:00
sorted_event_list_test.go Remove "All rights reserved" from all the headers. 2016-06-29 17:47:36 -07:00
sorted_event_list.go Remove "All rights reserved" from all the headers. 2016-06-29 17:47:36 -07:00
sorted_resource_name_list_test.go Remove "All rights reserved" from all the headers. 2016-06-29 17:47:36 -07:00
sorted_resource_name_list.go Merge pull request #28110 from mfojtik/describe-volume-mounts 2016-06-30 17:15:05 -07:00
sorting_printer_test.go Remove "All rights reserved" from all the headers. 2016-06-29 17:47:36 -07:00
sorting_printer.go Added warning msg for kubectl get 2016-08-15 22:49:37 +00:00
stop_test.go speed up RC scaler 2016-08-12 08:19:10 -04:00
stop.go let kubectl delete rc and rs using explicit non-orphan delete options 2016-08-11 11:30:26 -07:00
version.go Remove "All rights reserved" from all the headers. 2016-06-29 17:47:36 -07:00
watchloop.go Remove "All rights reserved" from all the headers. 2016-06-29 17:47:36 -07:00