kn plugins¶
The kn CLI supports the use of plugins. Plugins enable you to extend the functionality of your kn installation by adding custom commands and other shared commands that are not part of the core distribution of kn.
Warning
The plugins must be named with the prefix kn- to be detected by kn. For example, kn-func will be detected but func won't be detected.
kn source plugins¶
An event source plugin has the following characteristics:
- It has a name that is part of the kn sourcegroup.
- It provides CRUD sub-commands; create,update,delete,describe, and sometimesapply.
- It requires a mandatory --sinkflag to be passed when using thecreatecommand.
List of Knative plugins¶
You can view all available kn plugins in the Knative Extensions repository.
| Plugin | Description | Available via Homebrew? | 
|---|---|---|
| kn-plugin-admin | knplugin for managing a Kubernetes based Knative installation | Y | 
| kn-plugin-diag | knplugin for diagnosing issues by exposing detailed information for different layers of Knative objects | N | 
| kn-plugin-event | knplugin for sending events to Knative sinks | Y | 
| kn-plugin-func | knplugin for functions | Y | 
| kn-plugin-migration | knplugin for migrating Knative Services from one cluster to another | N | 
| kn-plugin-operator | knplugin for managing Knative with Knative Operator | N | 
| kn-plugin-quickstart | knplugin for developers to install a quickstart Knative cluster for experimentation purposes | Y | 
| kn-plugin-service-log | knplugin for showing the standard output of Knative Services | N | 
| kn-plugin-source-kafka | knplugin for managing Kafka event sources | Y | 
| kn-plugin-source-kamelet | knplugin for managing Kamelets and KameletBindings | Y | 
Manually install a plugin¶
You can manually install all plugins. To manually install a plugin:
- Download the current release of the plugin from GitHub. See the list of Knative plugins you can download.
- Rename the file to remove the OS and architecture information. For example, rename kn-admin-darwin-amd64tokn-admin.
- Make the plugin executable. For example, chmod +x kn-admin.
- Move the file to a directory on your PATH. For example,/usr/local/bin.
Install a plugin by using Homebrew¶
You can install some plugins can be installed using the Knative plugins Homebrew Tap. For example, you can install the kn-admin plugin by running brew install knative-extensions/kn-plugins/admin.
List available plugins¶
You can list all available (installed) plugins by entering the command:
kn plugin list