View on GitHub

Knative Hands-on Workshop

Why is deploying a Knative service easier than a Kubernetess deployment?

Installing OpenShift Serverless aka Knative

The OpenShift version of Knative is called OpenShift Serverless. It is installed and managed with an Operator.

  1. Go back to the OpenShift Web Console.

  2. In the ‘Adminstrator’ view, select ‘Operators -> OperatorHub’ and search for ‘serverless’: operatorhub

  3. Click on ‘OpenShift Serverless Operator’, then click on the blue ‘Install’ button. In the ‘Create Operator Subscription’ dialog keep the defaults, and click ‘Subscribe’: subscr

  4. The Console now displays the ‘Installed Operators’. Change to the ‘openshift-operators’ project and wait until the status shows ‘Succeeded / Up to date’: op status

  5. Next we create a namespace for Knative Serving. The Red Hat instructions specifically ask to create a namespace, not a project. Go to ‘Administrator: Administration -> Namespaces’, click ‘Create Namespace’ and enter ‘knative-serving’ as name: crt ns Click ‘Create’.

  6. Go back to ‘Installed Operators’, make sure the ‘knative-serving’ project is selected, and click on ‘Knative Serving’ API: crt kn srv

  7. Click the blue ‘Create Knative Serving’ button, check the YAML, and click ‘Create’: crt kn srv2

  8. In the ‘Operator Details’ view for the Serverless operator, you can now see the Knative Serving instance created. But it seems to stay in Status ‘Unknown’: status1

  9. Click on the Name ‘knative-serving’, on in the ‘Overview’ scroll down to Conditions. You can see all 4 conditions are true, including ‘Ready’: status2 In the ‘Resources’ tab you will see many deployments, services, pods, all should be ‘Created’ or ‘Running’.

We will not look into Knative Eventing in this workshop.


Continue with the next part Deploy a Knative Service