Kubernetes Sample App
This guide will walk you through deploying a "Online Boutique" sample application to an OpenScaler Kubernetes cluster.
Prerequisites
Ensure you have the following requirements
-
Shell environment with
git
, andkubectl
. -
An Kubernetes Cluster with 8GB of RAM for worker nodes. If you're using one of the following:
- A single node
- Two nodes with 4GB RAM each make sure to enable task scheduling on all nodes:
-
Make sure you have your Kubernetes cluster credentials set (see how to get access to your cluster).
Deploying the Sample Application
Clone the sample app
Clone the latest major version of the sample application
The --depth 1
argument skips downloading git history.
Deploy the sample app
From the root folder of this repository, navigate to the kustomize/
directory.
See what the default Kustomize configuration defined by kustomize/kustomization.yaml
will generate (without actually deploying them yet).
Apply the default Kustomize configuration (kustomize/kustomization.yaml
).
Access your Online Boutique application
You now have two options to access your Online Boutique application
- Option 1 : Access Application locally with port forwarding
- Option 2 : Access Application with Ingress through a Load Balancer.
Access Application locally with port forwarding
- Forward the frontend service to your local machine
- Forward the frontend service to your local machine
- Done! You may now access your Online Boutique application at http://localhost:8080
Access Application with Ingress
Since the application already has an Ingress resource configured, all you need to do is to create a LoadBalancer :
- Head to your Kubernetes cluster page choose your cluster from the list
- Create a LoadBalancer for your cluster from the "Network" tab and install your Ingress Controller (as described in the "Network" tab)
- Find your load balancer's HTTP port (for example
9039
) (follow guide in the "Network" tab) - Done! you can now access your Online Boutique application at
http://k8s.alpha.openscaler.net:YOUR_INGRESS_PORT
(replaceYOUR_INGRESS_PORT
with the port you found in the previous step)