Skip to content

Releases: knative/client

Knative Client release v0.20.0

14 Jan 17:23
8ca5db3
Compare
Choose a tag to compare
Pre-release

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.

Knative Client release v0.18.4

26 Nov 07:40
4e09c15
Compare
Choose a tag to compare
Pre-release

This update contains back-ports of a bug fix and an additional kn s390x build.
See the CHANGELOG for full details.

  • Fix a race condition when using Kubernetes watches
  • Add kn s390x binary to the release

Knative Client release v0.19.1

25 Nov 18:39
f128d04
Compare
Choose a tag to compare
Pre-release

This update contains back-ports of bug fixes and an additional kn s390x build.
See the CHANGELOG for full details.

  • Fix a race condition when using Kubernetes watches
  • Embed the namespace in request body while creating channels
  • Add kn s390x binary to the release

Knative Client release v0.18.3

24 Nov 10:19
6bcfca5
Compare
Choose a tag to compare
Pre-release

This minor update contains a back-port of a bug fix.
See the CHANGELOG for full details.

  • Embed the namespace in request body while creating channels

Knative Client release v0.17.4

24 Nov 09:55
e8e8280
Compare
Choose a tag to compare
Pre-release

This minor update contains a back-port of a bug fix.
See the CHANGELOG for full details.

  • Embed the namespace in request body while creating channels

Knative Client release v0.19.0

12 Nov 01:22
260970b
Compare
Choose a tag to compare
Pre-release

kn 0.19.0 introduces two new commands (kn service apply and kn service import) and removes some deprecated options, in addition to bug fixes and some other goodies described below.

Meta

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

Removed deprecated options

The following deprecated options have been removed:

  • --async for all CRUD commands. Use --no-wait instead
  • --requests-cpu, --request-memory, --limits-cpu and --limits-memory when managing services. The replacement is to use --limit memory=.. and --limit cpu=... (same for --request). Both options can be combined as in --limit memory=256Mi,cpu=500m

kn service apply

A new kn service apply command has been added to allow a declarative management for your Knative service.
This new command is especially useful in can CI/CD context to allow for idempotent operations when creating or updating services.
It works much like kubectl apply and used a client-side 3-way merge algorithm to update service. The kubectl merge algorithm is directly reused here.
As apply operates on Knative's custom resource types, it suffers the same limitation as the client-side merge algorithm in kubectl apply when dealing with CRDs.
I.e. arrays can't be merged but are just overwritten by an update.
This limitation affects all containers specific parameters.

For the future, we plan to add a better merge algorithm that supports a full strategic 3-way merge like the support of kubectl apply has for intrinsic K8s resources.

It is important to note that kn service apply is fundamentally different to kn service update as with kn service apply the full configuration needs to be provided as command-line options or within a declaration file when used with --filename.
With kn service update you only specify the parts to be updated and don't touch any other service configuration.
This characteristic of apply also implies that you always have to provide the image as the only mandatory parameter with kn service apply.

For example:

# Initially apply a service with the given image and env var
kn service apply random --image rhuss/random:1.0 --env foo=bar

# Update the service to add a ying=yang env var to the already existing one
kn service update random --env ying=yang

# Apply a full new configuration. Note that foo=bar will be removed
# because it is not specified here.
kn service apply random --image rhuss/random:1.0 --env ying=yang

kn service import

kn service import is the counterpart to kn service export and allows you to import a Service and all active revision that has been exported.
Active revisions are revisions that are referenced in a traffic-split.

This command is still marked experimental, and there are some known issues in the import how the generation of revision are created.
Please gives us feedback on how we can improve the support for this feature.

Other

The following other features have been added, too:

  • An arm64 flavour has been added to the released artefacts, as well as a checksum.txt which caries the sha256sum of all artefacts.
  • A channel: prefix has been added for --sink parameters, so that channels can be directly addressed by name.
  • Aliases are now appearing correctly in the help messages
  • The Client API as a new list filter WithLabel() which can be used when listing services.

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

Knative Client release v0.17.3

11 Nov 12:51
c17a432
Compare
Choose a tag to compare
Pre-release

This minor update contains a back-port of an essential feature addition.
See the CHANGELOG for full details.

  • Add channel sink prefix: A channel prefix is now supported with sink flag, for example: --sink channel:NAME.

Knative Client release v0.18.2

10 Nov 10:24
47f59f0
Compare
Choose a tag to compare
Pre-release

This minor update contains a back-port of an essential feature addition.
See the CHANGELOG for full details.

  • Add channel sink prefix: A channel prefix is now supported with sink flag, for example: --sink channel:NAME.

Knative Client release v0.18.1

14 Oct 05:20
b6fdb5c
Compare
Choose a tag to compare
Pre-release

This minor update contains backports of essential fix and some minor feature additions.
See the CHANGELOG for full details.

  • Fix for test flake when sync waiting and an intermediate error occurs
  • Add WithLabel list filter to serving client lib

Knative Client release v0.17.2

12 Oct 09:59
2d1944d
Compare
Choose a tag to compare
Pre-release

This minor update contains backports of essential fix and some minor feature additions.
See the CHANGELOG for full details.

  • Fix for test flake when sync waiting and an intermediate error occurs
  • Add WithLabel list filter to serving client lib