kubectl-server-version

command module
v0.2.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 1, 2019 License: Apache-2.0 Imports: 3 Imported by: 0

README

= kubectl server-version image:https://circleci.com/gh/bmuschko/kubectl-server-version.svg?style=svg["CircleCI", link="https://circleci.com/gh/bmuschko/kubectl-server-version"] image:https://goreportcard.com/badge/github.com/bmuschko/kubectl-server-version["Go Report Card", link="https://goreportcard.com/report/github.com/bmuschko/kubectl-server-version"]

A simple kubectl plugin for displaying the Kubernetes server version.
This project is meant to demonstrate the use of the Go-based Kubernetes client API invoked from a kubectl plugin.
Therefore, the plugin has not been registered with the kubectl plugin manager https://github.com/kubernetes-sigs/krew[krew].

## Building the binary from source

The project requires Go 1.11 or higher as dependencies are defined with the help of Go Modules.
First, activate Go Modules by setting the relevant environment variable.
Next, create the platform-specific binary with the `build` command.

[source,bash]
----
$ export GO111MODULES=on
$ go build -o kubectl-server_version
----

Binaries for a wide range of other platforms can be created with the help of https://github.com/goreleaser/goreleaser[GoReleaser].

[source,bash]
----
$ goreleaser release --skip-validate --snapshot --rm-dist
----

To release a new version of the binaries to GitHub Releases, create a Git tag and remove the relevant flags in the command above.

== Installation

The binary must be placed on the `$PATH` named `kubectl-server_version`. Ensure that the binary has execution permissions.
For more information, see the https://kubernetes.io/docs/tasks/extend-kubectl/kubectl-plugins/[official documentation on kubectl plugins].

== Usage

[source,bash]
----
$ kubectl server-version
Hello from Kubernetes server with version v1.10.11!
----

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL