Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Sign in
Toggle navigation
A
autoscaling-microservices
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
mohamadbashar.disoki
autoscaling-microservices
Commits
a87de172
Commit
a87de172
authored
Oct 24, 2023
by
Mohamad Bashar Desoki
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add KEDA Scaler Configurations
parent
61708eac
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
69 additions
and
0 deletions
+69
-0
README.md
k8s/Cluster/KEDA/README.md
+1
-0
open-prediction-scaler.yaml
k8s/Cluster/KEDA/open-prediction-scaler.yaml
+35
-0
prometheus-scaler.yaml
k8s/Cluster/KEDA/prometheus-scaler.yaml
+33
-0
No files found.
k8s/Cluster/KEDA/README.md
View file @
a87de172
...
...
@@ -15,3 +15,4 @@ helm upgrade --install keda kedacore/keda -n keda
![
https://blog.cloudacode.com/how-to-autoscale-kubernetes-pods-based-on-ingress-request-prometheus-keda-and-k6-84ae4250a9f3
](
img.png
)
The configuration of proposed scaler name is
*open-prediction-scaler.yaml*
, while the configuration of default KEDA prometheus Scaler name is
*prometheus-scaler.yaml*
k8s/Cluster/KEDA/open-prediction-scaler.yaml
0 → 100644
View file @
a87de172
apiVersion
:
keda.sh/v1alpha1
kind
:
ScaledObject
metadata
:
name
:
open-prediction-scaledobject
spec
:
minReplicaCount
:
1
maxReplicaCount
:
10
pollingInterval
:
300
cooldownPeriod
:
5
#idleReplicaCount: 0
scaleTargetRef
:
kind
:
Deployment
name
:
ms-demo
advanced
:
horizontalPodAutoscalerConfig
:
# Optional. Section to specify HPA related options
#name: {name-of-hpa-resource} # Optional. Default: keda-hpa-{scaled-object-name}
behavior
:
# Optional. Use to modify HPA's scaling behavior
scaleDown
:
stabilizationWindowSeconds
:
30
policies
:
-
type
:
Percent
value
:
100
periodSeconds
:
30
triggers
:
-
type
:
open-prediction
metadata
:
history
:
"
1d"
stepDuration
:
"
1m"
verticalWindow
:
"
1"
horizontalWindow
:
"
4"
predictionServiceAddress
:
"
10.10.10.80:50051"
prometheusAddress
:
http://prometheus-service.monitoring.svc:9090
query
:
sum(rate(nginx_ingress_controller_requests{path='/demo/(.*)'}[1m]))
threshold
:
'
9'
#activationThreshold: "0.025"
k8s/Cluster/KEDA/prometheus-scaler.yaml
0 → 100644
View file @
a87de172
apiVersion
:
keda.sh/v1alpha1
kind
:
ScaledObject
metadata
:
name
:
v1-ingress-throughput
spec
:
scaleTargetRef
:
kind
:
Deployment
# Optional. Default: Deployment
name
:
hello-world-two
# Mandatory. Must be in the same namespace as the ScaledObject
pollingInterval
:
300
# Optional. Default: 30 seconds
cooldownPeriod
:
5
# Optional. Default: 300 seconds
minReplicaCount
:
1
# Optional. Default: 0
#idleReplicaCount: 0
maxReplicaCount
:
10
# Optional. Default: 100
advanced
:
horizontalPodAutoscalerConfig
:
# Optional. Secti on to specify HPA related options
#name: {name-of-hpa-resource} # Optional. Defaul t: keda-hpa-{scaled-object-name}
behavior
:
# Optional. Use t o modify HPA's scaling behavior
scaleDown
:
stabilizationWindowSeconds
:
30
policies
:
-
type
:
Percent
value
:
100
periodSeconds
:
30
triggers
:
-
type
:
prometheus
metadata
:
serverAddress
:
http://prometheus-service.monitoring.svc:9090
metricName
:
nginx_ingress_controller_requests
threshold
:
'
9'
query
:
sum(rate(nginx_ingress_controller_requests{path="/hello/(.*)"}[1m]))
# activationThreshold: "0.025"
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment