Deploy Your First Application

Learn how to deploy and update applications on the serverless platform.

Now that we’ve installed Knative, let’s deploy applications with it.

We’ll deploy a basic "Hello World" application to learn how to deploy and configure an application on Knative. We can deploy an application using a YAML file and the Kubectl command or the kn CLI. We’ll use the kn CLI for the examples in this course. The sample container image we’ll deploy is hosted on Knative samples. We’ll need to install the kn CLI to use it.

Installing the kn CLI

The kn CLI provides a quick and easy interface for creating Knative resources, such as services and event sources, without the need to create or modify YAML files directly. It also simplifies the completion of otherwise complex procedures, such as autoscaling and traffic splitting.

To install and verify kn, use the commands given in the 1_installKnCLI.sh file.

To verify the installation, use the command:

kn version

The output of the command is given in the figure below:

Version:      v0.26.0
Build Date:   2021-09-22  17: 08: 53 
Git Revision: 61b8a754
Supported APIs: 
* Serving
 - serving.knative. dev/v1 (knative-serving v0.26.0) 
* Eventing 
 - sources.knative. dev/v1 (knative-eventing v0.26.0) 
 - eventinq.knative. dev/v1 (knative-eventing v0.26 .0)

Get hands-on with 1400+ tech skills courses.