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
-
The OpenShift Container Registry has been exposed by a cluster administrator.
Procedure
-
Run the
kn func build
orkn 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
-
Optionally, to verify that the function has been deployed, list all deployed functions in the namespace:
$ kn service list -n my-namespace
-
You can invoke the function the same way as if you used an external registry. See documentation on the individual runtimes for instructions.