1
0
mirror of https://github.com/openshift/openshift-docs.git synced 2026-02-06 06:46:26 +01:00
Files
openshift-docs/modules/serverless-create-channel-kn.adoc
OpenShift Cherrypick Robot a396f07407 Add kn channel docs (#26787)
Co-authored-by: abrennan <abrennan@redhat.com>
2020-10-27 10:16:45 -04:00

57 lines
1.5 KiB
Plaintext

// Module included in the following assemblies:
//
// * serverless/event_workflows/serverless-channels.adoc
[id="serverless-create-channel-kn_{context}"]
= Creating a channel using the Knative CLI
You can create a channel with the cluster default configuration by using the `kn` CLI.
.Prerequisites
To create channels using the `kn` CLI, ensure that:
* The {ServerlessOperatorName} and Knative Eventing are installed on your {product-title} cluster.
* You have installed the `kn` CLI.
* You have created a project or have access to a project with the appropriate roles and permissions to create applications and other workloads in {product-title}.
.Procedure
* Create a channel:
+
[source,terminal]
----
$ kn channel create <channel_name> --type <channel_type>
----
+
The channel type is optional, but where specified, must be given in the format `Group:Version:Kind`.
For example, you can create an `InMemoryChannel` object:
+
[source,terminal]
----
$ kn channel create mychannel --type messaging.knative.dev:v1beta1:InMemoryChannel
----
+
.Example output
[source,terminal]
----
Channel 'mychannel' created in namespace 'default'.
----
.Verification steps
* To confirm that the channel now exists, list the existing channels and inspect the output:
+
[source,terminal]
----
$ kn channel list
----
+
.Example output
[source,terminal]
----
kn channel list
NAME TYPE URL AGE READY REASON
mychannel InMemoryChannel http://mychannel-kn-channel.default.svc.cluster.local 93s True
----