Home > OS >  Improving Web Performance Deployed on Okteto
Improving Web Performance Deployed on Okteto

Time:05-13

I'm new in website deployment. I have this assignment where I have to deploy an existing website using kubernetes and improve its performance by doing auto scaling. I choose this app https://github.com/IBM/MAX-Image-Caption-Generator-Web-App. I deploy the app using okteto and here are steps that I've done:

  1. Download the source code into my local computer
  2. Okteto up
  3. Okteto build
  4. kubectl apply -f https://raw.githubusercontent.com/IBM/MAX-Image-Caption-Generator/master/max-image-caption-generator.yaml
  5. kubectl apply -f https://raw.githubusercontent.com/IBM/MAX-Image-Caption-Generator-Web-App/master/max-image-caption-generator-web-app.yaml
  6. App is successfully deployed

My question is how can I auto scale the app? Should I create my own docker image or I could just change the existing yaml configuration on my local and re-deploy the app? I'm sorry if my explanation and question are not clear enough.

CodePudding user response:

i checked your file YAML, i think you need to create obviously new docker images so that you will be able to deploy your website.

This is their docker image: image: quay.io/codait/max-image-caption-generator-web-app:latest

You can use the YAML for ref at least and update the image to deploy your website.

For auto-scaling you have to use the HPA object in Kubernetes, you can configure the autoscaling using YAML only and apply those changes simply.

Read more about HPA : https://kubernetes.io/docs/tasks/run-application/horizontal-pod-autoscale/

A simple example for HPA scaling web application with YAML: https://kubernetes.io/docs/tasks/run-application/horizontal-pod-autoscale-walkthrough/

  • Related