Using the integrated OpenShift Container Registry

When building and deploying functions, the resulting container image is stored in an image registry. In many cases, this will be a public registry, such as Quay. However, you can instead use the integrated OpenShift Container Registry (OCR), if it has been exposed.

Prerequisites
  1. The OpenShift Container Registry has been exposed by a cluster administrator.

Procedure
  1. Run the kn func build or kn func deploy function as you normally would, but specify the OpenShift Container Registry with the -r parameter:

    $ kn func build -i my-image -r image-registry.openshift-image-registry.svc
    $ kn func deploy -n my-namespace -i my-image -r image-registry.openshift-image-registry.svc
  2. Optionally, to verify that the function has been deployed, list all deployed functions in the namespace:

    $ kn service list -n my-namespace
  3. You can invoke the function the same way as if you used an external registry. See documentation on the individual runtimes for instructions.