code: func NewCmdVersion(f cmdutil.Factory, ioStreams genericclioptions.IOStreams) *cobra.Command {
  	o := NewOptions(ioStreams)
  	cmd := &cobra.Command{
  		Use:     "version",
  		Short:   i18n.T("Print the client and server version information"),
  		Long:    "Print the client and server version information for the current context",
  		Example: versionExample,
  		Run: func(cmd *cobra.Command, args []string) {
  			cmdutil.CheckErr(o.Complete(f, cmd))
  			cmdutil.CheckErr(o.Validate())
  			cmdutil.CheckErr(o.Run())
  		},
  	}
  	cmd.Flags().BoolVar(&o.ClientOnly, "client", o.ClientOnly, "Client version only (no server required).")
  	cmd.Flags().BoolVar(&o.Short, "short", o.Short, "Print just the version number.")
  	cmd.Flags().StringVarP(&o.Output, "output", "o", o.Output, "One of 'yaml' or 'json'.")
  	return cmd
  }
docs: // NewCmdVersion returns a cobra command for fetching versions