github knative/client v0.20.0
Knative Client release v0.20.0

latest releases: knative-v1.3.1, v0.30.1, knative-v1.3.0...
pre-release3 years ago

kn 0.20.0 introduces a new experimental offline mode (--target) for kn service create that allows creating Knative services locally in resource files and without the need to be connected to a cluster. In addition, the usual bug fixes and some smaller features have been added.

Meta

The compile dependencies have been updated to Knative Serving 0.20.0 and Knative Eventing 0.20.0. There are no changes in the used API version for communicating with the backend.

Offline mode

A new experimental offline mode has been added to kn service create. You enable it by using the option --target which can point to an existing directory or a filename. When provided kn will create a resource file that can be used with kn service create -f, kn service apply -f or even directly with kubectl. If the argument to --target is a filename or a non-existing path then a single file will be created. They format, YAML or JSON is determined by the file extension. If the argument to --target is a directory then the resource file is created within this directory by creating subdirectories for the namespace and type, using the service name as the filename's basename.

Examples:

# Create a YAML resource file "myservice.yml" with the custom resource definition of 
# the specified Knative service
kn service create myservice --image quay.io/myuser/myservice:latest --target ./myservice.yml

# Create a YAML resource file with the service definition in "service-dir/default/ksvc/myservice.yml"
# The directory "service-dir/" must already exist
kn service create myservice --image gcr.io/myproject/myservice:latest --target service-dir/

Scale option

The --scale option for kn service create and kn service update allows now also ranges as values:

  • --scale 1..5 : Scale down to a minimal 1 replica and up to 5 replicas
  • --scale 1.. : Set scale-min to to 1 but leave scale-max untouched (when used for a service update)
  • --scale ..5 : Set scale-max to 5 but leave scale-min untouched (when used for a service update)
  • --scale 5..5 : Set scale-min and scale-max both to 5 (same as --scale 5)

Support for new architectures

linux/s390x and linux/ppc64le has been added to the list of supported architectures, which is contains now
the following platforms: darwin/amd64, linux/amd64, linux/arm64, linux/ppc64le, linux/s390x and windows/amd64.

Misc

  • -o url is now supported in kn broker describe and kn channel describe.
  • Machine-readable output (e.g. -o json) has been added to the commands where it has been missing.
  • Fixes for the help and error message have been applied.

You can find the full list of changes in the CHANGELOG.

Don't miss a new client release

NewReleases is sending notifications on new releases.