diff --git a/CHANGELOG.adoc b/CHANGELOG.adoc index 0a0f53704..c78e55ff7 100644 --- a/CHANGELOG.adoc +++ b/CHANGELOG.adoc @@ -12,6 +12,18 @@ | https://github.com/knative/client/pull/[#] //// +## Unreleased + +[cols="1,10,3", options="header", width="100%"] +|=== +| | Description | PR + +| 🐛 +| Fix service export example documentation +| https://github.com/knative/client/pull/1006[#1006] + +|=== + ## v0.17.0 (2020-08-26) [cols="1,10,3", options="header", width="100%"] diff --git a/docs/cmd/kn_service_export.md b/docs/cmd/kn_service_export.md index 5a7f1af04..de0ab5dcd 100644 --- a/docs/cmd/kn_service_export.md +++ b/docs/cmd/kn_service_export.md @@ -16,12 +16,15 @@ kn service export NAME # Export a service in YAML format kn service export foo -n bar -o yaml + # Export a service in JSON format kn service export foo -n bar -o json + # Export a service with revisions - kn service export foo --with-revisions --mode=resources -n bar -o json + kn service export foo --with-revisions --mode=export -n bar -o json + # Export services in kubectl friendly format, as a list kind, one service item for each revision - kn service export foo --with-revisions --mode=kubernetes -n bar -o json + kn service export foo --with-revisions --mode=replay -n bar -o json ``` ### Options diff --git a/pkg/kn/commands/service/export.go b/pkg/kn/commands/service/export.go index edb733b63..e05bcc7c2 100644 --- a/pkg/kn/commands/service/export.go +++ b/pkg/kn/commands/service/export.go @@ -57,12 +57,15 @@ func NewServiceExportCommand(p *commands.KnParams) *cobra.Command { Example: ` # Export a service in YAML format kn service export foo -n bar -o yaml + # Export a service in JSON format kn service export foo -n bar -o json + # Export a service with revisions - kn service export foo --with-revisions --mode=resources -n bar -o json + kn service export foo --with-revisions --mode=export -n bar -o json + # Export services in kubectl friendly format, as a list kind, one service item for each revision - kn service export foo --with-revisions --mode=kubernetes -n bar -o json`, + kn service export foo --with-revisions --mode=replay -n bar -o json`, RunE: func(cmd *cobra.Command, args []string) error { if len(args) != 1 { return errors.New("'kn service export' requires name of the service as single argument")