Kubernetes with OpenShift World Tour: Get hands-on experience and build applications fast! Find a workshop!

Build a Knative serverless web application

Summary

This code pattern demonstrates creating an example travel web app using Node.js, React, and Knative, a platform based on Kubernetes for deploying and managing modern serverless workloads. Learn how to deploy and manage a destinations microservice and UI on Knative as a completely serverless application.

This sample travel application is a part of the Bee Travels GitHub project.

Description

This code pattern uses the Bee Travels GitHub project, a polyglot demo microservice application to demonstrate key capabilities of Kubernetes, Red Hat® OpenShift®, Istio, Knative, Kabanero, and many other cloud-native applications.

For this particular code pattern, see how to deploy and manage the destinations microservice and the travel application UI on Knative as a completely serverless application. The pattern focuses on Node.js, React, and Knative. You learn examples of Knative serving, specifically the autoscaling feature.

Through the UI of the sample travel application, you can search through different travel destinations and see detailed information about each destination.

Flow

Knative serverless application architecture flow diagram

  1. The user interacts with the travel application UI to search and view destination data. In interacting with the UI, the autoscaling of Knative serving is triggered for the UI.
  2. The travel app UI makes calls to the destination service APIs to get destination data. With the API calls, the autoscaling of Knative serving is triggered for the destination microservice.
  3. The necessary destination data is sent from the APIs to the travel app UI.
  4. The travel app UI displays the data from the APIs to the user.

Instructions

Find detailed technical steps for this code pattern in the README.md file in the GitHub repository.

  1. Clone the repo.
  2. Run the sample travel application locally.
  3. Deploy the app to Knative.
Max Shapiro
Mofizur Rahman