== kn vsphere Plugin
`kn vsphere` manages VMware vSphere sources and bindings.
=== Description
// A longer description which also describes the use cases that this plugin solves.
With this plugin, you can create Knative compatible Event Sources for vSphere events,
and Bindings to easily access the vSphere API.
See the `kn` plugins
https://github.com/knative/client/tree/8b8b56581c63901b8a73734f002d6f372ed83819/docs/plugins[page] for
details on plugin installation and discovery.
=== Usage
// This is the reference section explaining all options.
// This should start to contain the help message in a preformatted block
// and then all commands individually
// Note that the command should print out the format used when called via `kn`, not directly
// so, it's "kn hello [command]", not "kn-hello [command]"
----
Knative plugin to create Knative compatible Event Sources for VMware vSphere events,
and Bindings to access the vSphere API
Usage:
kn vsphere [command]
Available Commands:
auth Manage vSphere credentials
binding Manage vSphere API bindings
completion generate the autocompletion script for the specified shell
help Help about any command
source Manage vSphere Event Sources
version Prints the plugin version
Flags:
-h, --help help for kn-vsphere
Use "kn vsphere [command] --help" for more information about a command.
----
==== `kn vsphere auth`
----
Manage vSphere credentials
Usage:
kn vsphere auth [command]
Available Commands:
create Create vSphere credentials
delete Delete vSphere credentials
Flags:
-h, --help help for auth
-n, --namespace string namespace to use (default namespace if omitted)
Use "kn vsphere auth [command] --help" for more information about a command.
----
==== `kn vsphere binding`
----
Manage vSphere API bindings
Usage:
kn vsphere binding [command]
Available Commands:
create Create a vSphere binding to call into the vSphere API
delete Delete a vSphere binding
list List vSphere bindings
Flags:
-h, --help help for binding
-n, --namespace string namespace to use (default namespace if omitted)
Use "kn vsphere binding [command] --help" for more information about a command.
----
==== `kn vsphere source`
----
Manage vSphere Event Sources
Usage:
kn vsphere source [command]
Available Commands:
create Create a vSphere source to react to vSphere events
delete Delete a vSphere source
list List vSphere sources
Flags:
-h, --help help for source
-n, --namespace string namespace to use (default namespace if omitted)
Use "kn vsphere source [command] --help" for more information about a command.
----
==== `kn vsphere version`
This command prints out the version of this plugin and all extra information which might help, for example when creating bug reports.
----
Prints the plugin version
Usage:
kn vsphere version [flags]
Flags:
-h, --help help for version
----
=== Examples
==== Authenticating with vSphere
In order to connect to the vSphere event stream, the controller uses vSphere credentials which are created as a
`secret` in Kubernetes.
.Example create login credentials in the default namespace
====
----
$ kn vsphere auth create --username jane-doe --password s3cr3t --name vsphere-credentials
----
====
This will create a Secret `vsphere-credentials` in the `default` namespace that can be referred by a `VSphereSource`
or a `VSphereBinding`.
.Example create login credentials in the default namespace, verify the credentials and skip TLS errors, before creating the secret
====
----
$ kn vsphere auth create --username jane-doe --password s3cr3t --name vsphere-credentials --verify-url https://myvc.corp.local --verify-insecure
----
====
This will create a Secret `vsphere-credentials` in the `default` namespace that can be referred by a `VSphereSource`
or a `VSphereBinding`.
==== Create a basic VSphereSource
.Example Source creation in the default namespace
====
----
$ kn vsphere source create --name vc-01-source --vc-address https://vc-01.local --skip-tls-verify --secret-ref
vsphere-credentials --sink-uri http://where.to.send.stuff
----
====
This will create a `VSphereSource` named `vc-01-source` with the specified credentials to connect to vSphere and send vSphere events to
the specified URI.
==== Create a basic VSphereBinding
.Example Binding creation in the default namespace
====
----
$ kn vsphere binding create --name vc-01-binding --vc-address https://vc-01.local --skip-tls-verify --secret-ref
vsphere-credentials --subject-api-version app/v1 --subject-kind Deployment --subject-name my-simple-app
----
====
==== Print out the version of this plugin
The `kn vsphere version` command helps you to identify the version of this plugin.
.Example version output
=====
-----
$ kn vsphere version
Version: v0.27-next
Build Date: 2021-12-13T14:19:52Z
Git Revision: b55382f40ad1c7693e3a3a8593960d0624e45e0d
-----
=====
As you can see it prints out the version (or a generated timestamp when this plugin is built from a non-released commit),
the date when the plugin has been built and the actual Git revision.