Skip to content

Commit

Permalink
updated readmes
Browse files Browse the repository at this point in the history
  • Loading branch information
ks1009 committed Dec 15, 2022
1 parent 92fd436 commit 139d800
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 25 deletions.
2 changes: 0 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -93,8 +93,6 @@ Customizing the KEDA scaled object to use http requests, we are able to deploy r
We've incorporated Grafana to allow monitoring of the http requests of your application, alongside with the autoscaling that is triggered.
Our charts give users the security to know that KEDA is functional, deploying pods at higher workloads and disapating them when they are no longer necessary.

_insert youtube video here_

<p align="right">(<a href="#kedalyze">back to top</a>)</p>

# General Setup
Expand Down
46 changes: 23 additions & 23 deletions config/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,13 @@
<a href="#installation">Installing KEDA via Helm</a>
</li>
<li>
<a href="#Prometheus-setup">Installing a sample application</a>
<a href="#prometheus-setup">Installing a Sample Application</a>
</li>
<li>
<a href="#Sample-app">Using a sample application (optional)</a>
<a href="#sample-app">Using a Sample Application (Optional)</a>
</li>
<li>
<a href="#scaled-object">Creating a scaled object</a>
<a href="#scaled-object">Creating a Scaled Object</a>
</li>
<li>
<a href="#testing-load">Testing our KEDA Scaler</a>
Expand Down Expand Up @@ -62,42 +62,42 @@

**Note:** Now the prometheus values should all be true for KEDA now. If not, then please use the command

```sh
helm upgrade --set prometheus.metricServer.enabled=true --set prometheus.metricServer.podMonitor.enabled=true --set prometheus.operator.enabled=true --set prometheus.operator.podMonitor.enabled=true --set prometheus.operator.prometheusRules.enabled=true keda kedacore/keda --namespace keda
```
```sh
helm upgrade --set prometheus.metricServer.enabled=true --set prometheus.metricServer.podMonitor.enabled=true --set prometheus.operator.enabled=true --set prometheus.operator.podMonitor.enabled=true --set prometheus.operator.prometheusRules.enabled=true keda kedacore/keda --namespace keda
```

<p align="right">(<a href="#installation">back to top</a>)</p>

# Prometheus-setup
# Prometheus-Setup

## Setting up Prometheus

**Note:** The following steps use a sample app for testing purposes. this is **optional** because you can use your own application as well

3. Download [Go](https://go.dev/doc/install)
4. Create another namespace:
1. Download [Go](https://go.dev/doc/install)
2. Create another namespace:
```sh
kubectl create namespace keda-demo
```
5. If you'd like to use our custom Prometheus manifest (recommended), it is listed under (config/Prometheus/prometheus.yaml) . If not, modify your existing prometheus yaml configurations to adhere to our customizations.
3. If you'd like to use our custom Prometheus manifest (recommended), it is listed under (config/Prometheus/prometheus.yaml) . If not, modify your existing prometheus yaml configurations to adhere to our customizations.

6. If using our prometheus.yaml manifest, make sure to apply it
4. If using our prometheus.yaml manifest, make sure to apply it

```sh
kubectl apply -f Kedalyze/config/Prometheus/prometheus.yaml
```

7. Once the pod is up and running, see if it works on port 9090
5. Once the pod is up and running, see if it works on port 9090
```sh
kubectl -n keda-demo port-forward svc/prometheus-service 9090
```
If using your own prometheus manifest, replace {prometheus-service} with your prometheus service name.

<p align="right">(<a href="#installation">back to top</a>)</p>

# Sample-app
# Sample-App

## Using a sample application (optional)
## Using a Sample Application (Optional)

1. Use the manifest file under (config/SampleApplication/go-deployment.yaml) to create your application.
**Note:** you can apply your own image as well
Expand All @@ -123,19 +123,19 @@

<p align="right">(<a href="#installation">back to top</a>)</p>

# scaled-object
# Scaled-Object

## Creating a scaled object
## Creating a Scaled Object

1. Now that we have our application, we can create a scaled object! To use our custom yaml file (Recommended) locate it under (config/SampleApplication/scaled-object.yaml)

a) Read the yaml manifest and it’s comments to understand what is going on. One important note as well is in advanced.horizontalPodAutoscalerConfig.scaleUp.policies you can see I have specified 50%, that means our pod will scale up with 50% of it’s current amount of pods. 1 -> 2 -> 3 -> 5 -> 8 -> 12 -> 18 -> 20 it will stop at 20 pods because that is the limit we specified.
a) Read the yaml manifest and it’s comments to understand what is going on. One important note as well is in advanced.horizontalPodAutoscalerConfig.scaleUp.policies you can see I have specified 50%, that means our pod will scale up with 50% of it’s current amount of pods. 1 -> 2 -> 3 -> 5 -> 8 -> 12 -> 18 -> 20 it will stop at 20 pods because that is the limit we specified.

b) Make sure to change the service address to your prometheus service address
b) Make sure to change the service address to your prometheus service address

- You can check this by going to prometheus's port: `localhost:9090 > Status > Command-Line Flags > --web.external-url`

c) The query will be scaling the application up and down based on the amount of http requests coming into Prometheus
c) The query will be scaling the application up and down based on the amount of http requests coming into Prometheus

2. Apply the manifest:

Expand All @@ -155,7 +155,7 @@ c) The query will be scaling the application up and down based on the amount of

<p align="right">(<a href="#installation">back to top</a>)</p>

# testing-load
# Testing-Load

## Testing our KEDA Scaler

Expand Down Expand Up @@ -289,13 +289,13 @@ Kube State metrics is a service that talks to the Kubernetes API server to get a

5. Once connected to the Grafana UI, go to settings > configuration > data sources > add > prometheus

- For the HTTP URL, put in http://prometheus-service.keda-demo.svc:9090
- For the HTTP URL, put in http://prometheus-service.keda-demo.svc:9090

6. Prometheus metrics should now be accessible on Grafana
7. The two main metrics we are focused on seeing the autoscaling based on HTTP requests are:

- keda_metrics_adapter_scaler_metrics_value
- http_requests
- keda_metrics_adapter_scaler_metrics_value
- http_requests

<p align="right">(<a href="#installation">back to top</a>)</p>

Expand Down
Binary file modified demo-gifs/KEDA.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 139d800

Please sign in to comment.