1
0
mirror of https://github.com/openshift/openshift-docs.git synced 2026-02-05 12:46:18 +01:00
Files
openshift-docs/modules/serverless-update-subscriptions-kn.adoc
2023-10-30 10:13:25 -04:00

37 lines
1.5 KiB
Plaintext

// Module included in the following assemblies:
//
// * /serverless/develop/serverless-subs.adoc
:_mod-docs-content-type: PROCEDURE
[id="serverless-update-subscriptions-kn_{context}"]
= Updating subscriptions by using the Knative CLI
You can use the `kn subscription update` command as well as the appropriate flags to update a subscription from the terminal by using the Knative (`kn`) CLI. Using the Knative CLI to update subscriptions provides a more streamlined and intuitive user interface than updating YAML files directly.
.Prerequisites
* You have installed the Knative (`kn`) CLI.
* You have created a subscription.
.Procedure
* Update a subscription:
+
[source,terminal]
----
$ kn subscription update <subscription_name> \
--sink <sink_prefix>:<sink_name> \ <1>
--sink-dead-letter <sink_prefix>:<sink_name> <2>
----
<1> `--sink` specifies the updated target destination to which the event should be delivered. You can specify the type of the sink by using one of the following prefixes:
`ksvc`:: A Knative service.
`channel`:: A channel that should be used as destination. Only default channel types can be referenced here.
`broker`:: An Eventing broker.
<2> Optional: `--sink-dead-letter` is an optional flag that can be used to specify a sink which events should be sent to in cases where events fail to be delivered. For more information, see the {ServerlessProductName} _Event delivery_ documentation.
+
.Example command
[source,terminal]
----
$ kn subscription update mysubscription --sink ksvc:event-display
----