kubectlk8s.io/kubectl/pkg/cmd/version Index | Files

package version

import "k8s.io/kubectl/pkg/cmd/version"

Index

Functions

func GetKustomizeModVersion

func GetKustomizeModVersion() (string, bool)

func NewCmdVersion

func NewCmdVersion(f cmdutil.Factory, ioStreams genericiooptions.IOStreams) *cobra.Command

NewCmdVersion returns a cobra command for fetching versions

Types

type Options

type Options struct {
	ClientOnly bool
	Output     string

	genericiooptions.IOStreams
	// contains filtered or unexported fields
}

Options is a struct to support version command

func NewOptions

func NewOptions(ioStreams genericiooptions.IOStreams) *Options

NewOptions returns initialized Options

func (*Options) Complete

func (o *Options) Complete(f cmdutil.Factory, cmd *cobra.Command, args []string) error

Complete completes all the required options

func (*Options) Run

func (o *Options) Run() error

Run executes version command

func (*Options) Validate

func (o *Options) Validate() error

Validate validates the provided options

type Version

type Version struct {
	ClientVersion    *apimachineryversion.Info `json:"clientVersion,omitempty" yaml:"clientVersion,omitempty"`
	KustomizeVersion string                    `json:"kustomizeVersion,omitempty" yaml:"kustomizeVersion,omitempty"`
	ServerVersion    *apimachineryversion.Info `json:"serverVersion,omitempty" yaml:"serverVersion,omitempty"`
}

Version is a struct for version information

Source Files

skew_warning.go version.go

Version
v0.32.3 (latest)
Published
Mar 12, 2025
Platform
linux/amd64
Imports
17 packages
Last checked
5 days ago

Tools for package owners.