Installing our Demo Application
In the first step, we will install a simple demo application that we will use throughout this lab. The application consists of multiple components: a frontend, a backend, and a database. The frontend is a simple web application that proxies requests to the backend. The backend is a simple REST API that connects to a database and returns data. The database is a MariaDB instance that stores the data.
For this lab, some things have already been prepared. They can be found in the GitHub repository at https://github.com/tsclabs-eu/lab-istio-rollouts. To clone the repository, change into a directory of your choice and run:
git clone https://github.com/tsclabs-eu/lab-istio-rollouts
cd lab-istio-rollouts
After cloning the repository, create a new namespace for the demo application and switch to it:
kubectl create namespace learning-tracker
kubectl config set-context --current --namespace=learning-tracker
Finally, install the demo application using the provided manifests:
kubectl apply -f 01_app_manifests/.
This should install all components of the demo application with multiple replicas. To verify that everything is running, execute:
kubectl get all
You should see 3 API pods, 2 frontend pods, one MariaDB pod, and the corresponding services as shown below:
NAME READY STATUS RESTARTS AGE
pod/learning-tracker-api-7bf6b57c64-5wv6k 1/1 Running 2 (107s ago) 2m
pod/learning-tracker-api-7bf6b57c64-65lvj 1/1 Running 2 (105s ago) 2m
pod/learning-tracker-api-7bf6b57c64-jv62c 1/1 Running 2 (104s ago) 2m
pod/learning-tracker-frontend-8687988f45-b2vpk 1/1 Running 0 2m
pod/learning-tracker-frontend-8687988f45-x6s8t 1/1 Running 0 2m
pod/mariadb-78bc6fcd4d-627m9 1/1 Running 0 2m
NAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGE
service/learning-tracker-api ClusterIP 10.101.229.169 <none> 80/TCP 2m
service/learning-tracker-frontend ClusterIP 10.106.224.16 <none> 80/TCP 2m
service/mariadb ClusterIP 10.108.137.144 <none> 3306/TCP 2m
NAME READY UP-TO-DATE AVAILABLE AGE
deployment.apps/learning-tracker-api 3/3 3 3 2m
deployment.apps/learning-tracker-frontend 2/2 2 2 2m
deployment.apps/mariadb 1/1 1 1 2m
NAME DESIRED CURRENT READY AGE
replicaset.apps/learning-tracker-api-7bf6b57c64 3 3 3 2m
replicaset.apps/learning-tracker-frontend-8687988f45 2 2 2 2m
replicaset.apps/mariadb-78bc6fcd4d 1 1 1 2m
To validate that the application is working, you can port-forward the frontend service to your local machine. In a new terminal window, run:
kubectl port-forward svc/learning-tracker-frontend 8080:80
Now, open your browser and navigate to http://localhost:8080. You should see the frontend of the demo application. You should be able to add new learning goals and move them through the statuses “In Progress” and “Completed.” Furthermore, you should see a status bar on the right side that shows information about the backend and database connection.
With this, we have successfully installed and verified our demo application. In the next step, we will install Istio and configure it to manage the traffic between the components of our application.
