Skip to main content

Frontend web applications

Kusk Gatewys deploys APIs but also web applications written in any language and framework.

Web application do not use OpenAPIs, so in this case to deploy a frontend application, you will need to use Kusk's StaticRoutes.


To deploy your web application, you will need to build a container of the web app. For the purposes of this demo, we've built an example web application, containerized it and pushed it to a Docker repository. We will use this container in the example.

Deploy the web application to Kubernetes

kubectl create deployment web-app --image=kubeshop/kusk-web-app-example:v1.0.0
kubectl expose deployment web-app --name web-app-svc --port=3000

Create a Kusk StaticRoute to deploy the application

kind: StaticRoute
name: web-app-sample
name: kusk-gateway-envoy-fleet
namespace: kusk-system
name: web-app-svc
namespace: default
port: 3000

And apply the Custom Resource containing the deployment details of your web application:

kubectl apply -f static-route.yaml
Expected output created

Test that the web application is deployed correctly

Get the IP address information of Kusk:

kusk ip


And visit that URL in the browser:

Deployed application test

That's it, with these simple steps your web application is now deployed in Kubernetes using Kusk!

You'll also be surprise by how easy it is to add OAuth to your web application so easily using Kusk, check the OAuth guide for web applications.