Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request kubernetes#30955 from lojies/modifygetresource
Automatic merge from submit-queue use valid_resources to replace kubectl.PossibleResourceTypes ```release Fix resource list printed by kubectl help ``` `kubectl get` return > You must specify the type of resource to get. Valid resource types include: * componentstatuses (aka 'cs') * configmaps * daemonsets (aka 'ds') * deployments * events (aka 'ev') * endpoints (aka 'ep') * horizontalpodautoscalers (aka 'hpa') * ingress (aka 'ing') * jobs * limitranges (aka 'limits') * nodes (aka 'no') * namespaces (aka 'ns') * pods (aka 'po') * persistentvolumes (aka 'pv') * persistentvolumeclaims (aka 'pvc') * quota * resourcequotas (aka 'quota') * replicasets (aka 'rs') * replicationcontrollers (aka 'rc') * secrets * serviceaccounts (aka 'sa') * services (aka 'svc') error: Required resource not specified. See 'kubectl get -h' for help and examples. while `kubectl get --help` return > root@k8s-node1:~# kubectl get --help Display one or many resources. Possible resource types include (case insensitive): pods (po), services (svc), deployments, replicasets (rs), replicationcontrollers (rc), nodes (no), events (ev), limitranges (limits), persistentvolumes (pv), persistentvolumeclaims (pvc), resourcequotas (quota), namespaces (ns), serviceaccounts (sa), ingresses (ing), horizontalpodautoscalers (hpa), daemonsets (ds), configmaps, componentstatuses (cs), endpoints (ep), and secrets. 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). ...... kubectl.PossibleResourceTypes missing some resouces such as jobs quota. describe and explain have the same problem. i think using valid_resources to replace kubectl.PossibleResourceTypes more suitable.
- Loading branch information