mirror of
https://github.com/k3s-io/kubernetes.git
synced 2026-01-06 16:06:51 +00:00
update kubectl subcommand with -k changes
This commit is contained in:
@@ -115,6 +115,9 @@ var (
|
||||
# List a pod identified by type and name specified in "pod.yaml" in JSON output format.
|
||||
kubectl get -f pod.yaml -o json
|
||||
|
||||
# List resources from a directory with kustomization.yaml - e.g. dir/kustomization.yaml.
|
||||
kubectl get -k dir/
|
||||
|
||||
# Return only the phase value of the specified pod.
|
||||
kubectl get -o template pod/web-pod-13je7 --template={{.status.phase}}
|
||||
|
||||
@@ -257,7 +260,7 @@ func (o *GetOptions) Complete(f cmdutil.Factory, cmd *cobra.Command, args []stri
|
||||
switch {
|
||||
case o.Watch || o.WatchOnly:
|
||||
default:
|
||||
if len(args) == 0 && cmdutil.IsFilenameSliceEmpty(o.Filenames) {
|
||||
if len(args) == 0 && cmdutil.IsFilenameSliceEmpty(o.Filenames, o.Kustomize) {
|
||||
fmt.Fprintf(o.ErrOut, "You must specify the type of resource to get. %s\n\n", cmdutil.SuggestAPIResources(o.CmdParent))
|
||||
fullCmdName := cmd.Parent().CommandPath()
|
||||
usageString := "Required resource not specified."
|
||||
|
||||
Reference in New Issue
Block a user