-
Notifications
You must be signed in to change notification settings - Fork 480
Created Procedure for Setting Up a Scaler #1415
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Closed
Closed
Changes from 6 commits
Commits
Show all changes
39 commits
Select commit
Hold shift + click to select a range
24caa92
Created Procedure for Setting Up a Scaler Signed-off-by: Shubham Shar…
shubhusion fb611d3
Merge branch 'kedacore:main' into shubhusion
shubhusion 3f00c43
Added a Note
shubhusion f5144f8
Merge branch 'main' into shubhusion
shubhusion 8400fa6
Merge branch 'main' into shubhusion
shubhusion 423462e
Merge branch 'main' into shubhusion
shubhusion 68f0a47
Update content/docs/2.14/operate/setupscaler.md
shubhusion 98cda61
Update content/docs/2.14/operate/setupscaler.md
shubhusion 2909cf4
Update content/docs/2.15/operate/setupscaler.md
shubhusion 1b843b3
Update content/docs/2.15/operate/setupscaler.md
shubhusion e941483
Update content/docs/2.14/operate/setupscaler.md
shubhusion 2e4252d
Merge branch 'main' into shubhusion
shubhusion 5de1376
Changed File location
shubhusion 8c6ae10
Created Procedure for Setting Up a Scaler Signed-off-by: Shubham Shar…
shubhusion a5d80c0
chore: strip out raw HTML from docs (#1414)
thisisobate eba4f53
Added Reference section, Glossary, removed non-inclusive language. (#…
dwelsch-esi 8f8bb08
Added a Note
shubhusion fc9e3a0
Add support for cassandra tls under v2.15 (#1390)
rxg8255 0927db2
feat: splunk scaler docs (#1413)
circa10a 704e541
Feat: version faq docs (#1416)
thisisobate ddd894d
Update Kedify link (#1421)
zroubalik 7f49ce0
fix: Align Kedify links (#1422)
tomkerkhove eedd10e
chore: fix faq version dropdown in older versions (#1423)
thisisobate cabfc59
Update (#1420)
SpiritZhou c868e70
Add lightweight Scarf analytics pixel to thewebsite (#1426)
zroubalik 4c84e5e
put tracking pixel into correct location (#1427)
zroubalik 4080c91
navbar + hero refactor (#1428)
zroubalik a8bb32f
Mysql scaler username from env (#1419)
Indresh2410 785fe4e
feat: update IBM MQ scaler docs for TLS support (#1433)
rickbrouwer 95d3a31
feat: add GCP Pub/Sub new optional valueIfNull trigger configuration …
Caislear fe0e494
Update postgres scaler doc for aad (#1437)
Ferdinanddb e6e63dd
Add Datadog scaler docs for the new option to use the Cluster Agent a…
arapulido 2a3835c
Add queueLengthStrategy option to azure-storage-queue scaler. (#1406)
leodip b9dedbe
add explanation fore eager scaling strategy (#1438)
zroubalik 824c5d3
Added Playstudios as listed user (#1436)
n3wt0n b751c5d
Adding a note about Prometheus metrics being emitted scalers are depl…
pauldotyu a618868
add: Istio operation doc (#1418)
1it 34b0e4e
fix: `initialCooldownPeriod` is missing in the SO Spec example (#1411)
zroubalik 965a94e
Merge branch 'shubhusion' of https://github.com/shubhusion/keda-docs …
shubhusion File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,120 @@ | ||
+++ | ||
title = "Setupscaler" | ||
weight = 500 | ||
description = "Procedure to Setup a Scaler in KEDA" | ||
shubhusion marked this conversation as resolved.
Show resolved
Hide resolved
|
||
+++ | ||
|
||
## Prerequisites | ||
|
||
1. **Kubernetes Cluster**: | ||
- Ensure you have a running Kubernetes cluster set up and accessible. | ||
- If you don't have a cluster yet, follow the [official Kubernetes documentation](https://kubernetes.io/docs/setup/) to create a new cluster suitable for your environment (local machine, cloud provider, etc.). | ||
|
||
2. **KEDA Installation**: | ||
- KEDA needs to be installed on your Kubernetes cluster before you can use it. | ||
- Follow the [KEDA installation guide](https://keda.sh/docs/2.14/deploy/) carefully, including any prerequisites specific to your Kubernetes setup. | ||
- The installation guide provides instructions for different installation methods (e.g., YAML, Helm charts, etc.). Choose the method that suits your needs. | ||
|
||
3. **kubectl**: | ||
- The `kubectl` command-line tool is required to interact with your Kubernetes cluster. | ||
- Follow the [official kubectl installation guide](https://kubernetes.io/docs/tasks/tools/#kubectl) to install `kubectl` on your operating system. | ||
- Once installed, configure `kubectl` to communicate with your Kubernetes cluster by following the cluster-specific instructions provided by your Kubernetes setup. | ||
|
||
## Step 1: Identify the Scaler You Need | ||
|
||
KEDA supports various scalers that correspond to different event sources or triggers. Determining the right scaler is crucial for scaling your application based on the desired event source. | ||
|
||
1. Visit the [KEDA Scalers documentation](https://keda.sh/docs/2.14/scalers/) and browse through the list of available scalers. | ||
2. Identify the scaler that matches the event source you want to use for scaling your application. For example: | ||
- If you want to scale based on incoming HTTP traffic, you would need the **HTTP Add-on**. | ||
shubhusion marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
||
> **Note:** | ||
> The HTTP Add-on is still in beta stage and may not provide the full functionality or stability expected in a production environment. | ||
|
||
- If you want to scale based on messages in a RabbitMQ queue, you would need the **RabbitMQ scaler**. | ||
- If you want to scale based on a cron schedule, you would need the **Cron scaler**. | ||
3. Open the documentation page for your chosen scaler and familiarize yourself with its specific requirements and configuration options. | ||
|
||
## Step 2: Install the Required Scaler (if needed) | ||
|
||
Some scalers are part of the core KEDA installation, while others need to be installed separately as add-ons. | ||
|
||
1. Refer to the documentation of your chosen scaler to check if it needs to be installed separately. | ||
2. If the scaler needs to be installed separately, follow the installation instructions provided in the scaler's documentation carefully. | ||
- The installation process typically involves running a command (e.g., `helm install` for Helm charts) or applying YAML manifests using `kubectl`. | ||
3. Verify that the scaler has been installed successfully by checking the output of the installation process or by running any provided verification commands. | ||
|
||
## Step 3: Create a ScaledObject Configuration File | ||
|
||
KEDA uses a custom resource called `ScaledObject` to define how your application should be scaled based on the chosen event source or trigger. | ||
|
||
1. Create a new file (e.g., `scaledobject.yaml`) in a text editor or using the command line. | ||
2. Define the `ScaledObject` configuration in this file, following the structure and examples provided in the documentation of your chosen scaler. | ||
3. Typically, the `ScaledObject` configuration includes the following sections: | ||
- `metadata`: Specifies the name and namespace for the `ScaledObject`. | ||
- `spec.scaleTargetRef`: Identifies the Kubernetes deployment or other resource that should be scaled. | ||
- `spec.pollingInterval` (optional): Specifies how often KEDA should check for scaling events (defaults to 15 seconds). | ||
- `spec.cooldownPeriod` (optional): Specifies the cool-down period in seconds after a scaling event (defaults to 300 seconds). | ||
- `spec.maxReplicaCount` (optional): Specifies the maximum number of replicas to scale up to (defaults to 100). | ||
- `spec.triggers`: Defines the specific configuration for your chosen scaler, including any required parameters or settings. | ||
4. Refer to the scaler's documentation for detailed explanations and examples of the `triggers` section and any other required or optional configuration settings. | ||
5. Save the `scaledobject.yaml` file after making the necessary modifications. | ||
|
||
## Step 4: Apply the ScaledObject Configuration | ||
|
||
Once you have created the `ScaledObject` configuration file, apply it to your Kubernetes cluster using `kubectl`: | ||
|
||
1. Open a terminal or command prompt and navigate to the directory containing the `scaledobject.yaml` file. | ||
2. Run the following command to apply the `ScaledObject` configuration: | ||
|
||
```bash | ||
kubectl apply -f scaledobject.yaml | ||
``` | ||
|
||
```plaintext | ||
scaledobject.keda.sh/<scaled-object-name> created | ||
``` | ||
|
||
3. Verify that the `ScaledObject` has been created successfully by running: | ||
|
||
```bash | ||
kubectl get scaledobjects | ||
``` | ||
|
||
This should display the `ScaledObject` you just created. | ||
|
||
```plaintext | ||
NAME SCALETARGETKIND SCALETARGETNAME MIN MAX TRIGGERS AUTHENTICATION READY ACTIVE FALLBACK AGE | ||
<scaled-object-name> Deployment <deployment-name> 1 10 cpu <none> True False <none> 10s | ||
``` | ||
|
||
After applying the `ScaledObject` configuration, KEDA will start monitoring the specified event source and scale your application accordingly, based on the configurations you provided. | ||
|
||
## Step 5: Monitor Scaling Events | ||
|
||
You can monitor the scaling events and logs generated by KEDA using the following commands: | ||
|
||
1. List all `ScaledObjects` in your cluster: | ||
|
||
```bash | ||
kubectl get scaledobjects | ||
``` | ||
|
||
This will show you the current state of your `ScaledObject` and the number of replicas. | ||
|
||
```plaintext | ||
NAME SCALETARGETKIND SCALETARGETNAME MIN MAX TRIGGERS AUTHENTICATION READY ACTIVE FALLBACK AGE | ||
<scaled-object-name> Deployment <deployment-name> 1 10 cpu <none> True False <none> 10s | ||
``` | ||
|
||
2. View the logs of the KEDA operator: | ||
|
||
```bash | ||
kubectl logs -n keda -l app=keda-operator | ||
``` | ||
|
||
The KEDA operator logs will show you detailed information about scaling events, decisions made by KEDA based on the event source, and any errors or warnings. | ||
|
||
```plaintext | ||
{"level":"info","ts":<timestamp>,"logger":"scalehandler","msg":"Successfully scaled deployment","scaledobject.Namespace":"<namespace>","scaledobject.Name":"<scaled-object-name>","scaler":<scaler-type>} | ||
``` |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,120 @@ | ||
+++ | ||
title = "Setupscaler" | ||
shubhusion marked this conversation as resolved.
Show resolved
Hide resolved
|
||
weight = 500 | ||
description = "Procedure to Setup a Scaler in KEDA" | ||
shubhusion marked this conversation as resolved.
Show resolved
Hide resolved
|
||
+++ | ||
|
||
## Prerequisites | ||
|
||
1. **Kubernetes Cluster**: | ||
- Ensure you have a running Kubernetes cluster set up and accessible. | ||
- If you don't have a cluster yet, follow the [official Kubernetes documentation](https://kubernetes.io/docs/setup/) to create a new cluster suitable for your environment (local machine, cloud provider, etc.). | ||
|
||
2. **KEDA Installation**: | ||
- KEDA needs to be installed on your Kubernetes cluster before you can use it. | ||
- Follow the [KEDA installation guide](https://keda.sh/docs/2.14/deploy/) carefully, including any prerequisites specific to your Kubernetes setup. | ||
- The installation guide provides instructions for different installation methods (e.g., YAML, Helm charts, etc.). Choose the method that suits your needs. | ||
|
||
3. **kubectl**: | ||
- The `kubectl` command-line tool is required to interact with your Kubernetes cluster. | ||
- Follow the [official kubectl installation guide](https://kubernetes.io/docs/tasks/tools/#kubectl) to install `kubectl` on your operating system. | ||
- Once installed, configure `kubectl` to communicate with your Kubernetes cluster by following the cluster-specific instructions provided by your Kubernetes setup. | ||
|
||
## Step 1: Identify the Scaler You Need | ||
|
||
KEDA supports various scalers that correspond to different event sources or triggers. Determining the right scaler is crucial for scaling your application based on the desired event source. | ||
|
||
1. Visit the [KEDA Scalers documentation](https://keda.sh/docs/2.14/scalers/) and browse through the list of available scalers. | ||
2. Identify the scaler that matches the event source you want to use for scaling your application. For example: | ||
- If you want to scale based on incoming HTTP traffic, you would need the **HTTP Add-on**. | ||
shubhusion marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
||
> **Note:** | ||
> The HTTP Add-on is still in beta stage and may not provide the full functionality or stability expected in a production environment. | ||
|
||
- If you want to scale based on messages in a RabbitMQ queue, you would need the **RabbitMQ scaler**. | ||
- If you want to scale based on a cron schedule, you would need the **Cron scaler**. | ||
3. Open the documentation page for your chosen scaler and familiarize yourself with its specific requirements and configuration options. | ||
|
||
## Step 2: Install the Required Scaler (if needed) | ||
|
||
Some scalers are part of the core KEDA installation, while others need to be installed separately as add-ons. | ||
|
||
1. Refer to the documentation of your chosen scaler to check if it needs to be installed separately. | ||
2. If the scaler needs to be installed separately, follow the installation instructions provided in the scaler's documentation carefully. | ||
- The installation process typically involves running a command (e.g., `helm install` for Helm charts) or applying YAML manifests using `kubectl`. | ||
3. Verify that the scaler has been installed successfully by checking the output of the installation process or by running any provided verification commands. | ||
|
||
## Step 3: Create a ScaledObject Configuration File | ||
|
||
KEDA uses a custom resource called `ScaledObject` to define how your application should be scaled based on the chosen event source or trigger. | ||
|
||
1. Create a new file (e.g., `scaledobject.yaml`) in a text editor or using the command line. | ||
2. Define the `ScaledObject` configuration in this file, following the structure and examples provided in the documentation of your chosen scaler. | ||
3. Typically, the `ScaledObject` configuration includes the following sections: | ||
- `metadata`: Specifies the name and namespace for the `ScaledObject`. | ||
- `spec.scaleTargetRef`: Identifies the Kubernetes deployment or other resource that should be scaled. | ||
- `spec.pollingInterval` (optional): Specifies how often KEDA should check for scaling events (defaults to 15 seconds). | ||
- `spec.cooldownPeriod` (optional): Specifies the cool-down period in seconds after a scaling event (defaults to 300 seconds). | ||
- `spec.maxReplicaCount` (optional): Specifies the maximum number of replicas to scale up to (defaults to 100). | ||
- `spec.triggers`: Defines the specific configuration for your chosen scaler, including any required parameters or settings. | ||
4. Refer to the scaler's documentation for detailed explanations and examples of the `triggers` section and any other required or optional configuration settings. | ||
5. Save the `scaledobject.yaml` file after making the necessary modifications. | ||
|
||
## Step 4: Apply the ScaledObject Configuration | ||
|
||
Once you have created the `ScaledObject` configuration file, apply it to your Kubernetes cluster using `kubectl`: | ||
|
||
1. Open a terminal or command prompt and navigate to the directory containing the `scaledobject.yaml` file. | ||
2. Run the following command to apply the `ScaledObject` configuration: | ||
|
||
```bash | ||
kubectl apply -f scaledobject.yaml | ||
``` | ||
|
||
```plaintext | ||
scaledobject.keda.sh/<scaled-object-name> created | ||
``` | ||
|
||
3. Verify that the `ScaledObject` has been created successfully by running: | ||
|
||
```bash | ||
kubectl get scaledobjects | ||
``` | ||
|
||
This should display the `ScaledObject` you just created. | ||
|
||
```plaintext | ||
NAME SCALETARGETKIND SCALETARGETNAME MIN MAX TRIGGERS AUTHENTICATION READY ACTIVE FALLBACK AGE | ||
<scaled-object-name> Deployment <deployment-name> 1 10 cpu <none> True False <none> 10s | ||
``` | ||
|
||
After applying the `ScaledObject` configuration, KEDA will start monitoring the specified event source and scale your application accordingly, based on the configurations you provided. | ||
|
||
## Step 5: Monitor Scaling Events | ||
|
||
You can monitor the scaling events and logs generated by KEDA using the following commands: | ||
|
||
1. List all `ScaledObjects` in your cluster: | ||
|
||
```bash | ||
kubectl get scaledobjects | ||
``` | ||
|
||
This will show you the current state of your `ScaledObject` and the number of replicas. | ||
|
||
```plaintext | ||
NAME SCALETARGETKIND SCALETARGETNAME MIN MAX TRIGGERS AUTHENTICATION READY ACTIVE FALLBACK AGE | ||
<scaled-object-name> Deployment <deployment-name> 1 10 cpu <none> True False <none> 10s | ||
``` | ||
|
||
2. View the logs of the KEDA operator: | ||
|
||
```bash | ||
kubectl logs -n keda -l app=keda-operator | ||
``` | ||
|
||
The KEDA operator logs will show you detailed information about scaling events, decisions made by KEDA based on the event source, and any errors or warnings. | ||
|
||
```plaintext | ||
{"level":"info","ts":<timestamp>,"logger":"scalehandler","msg":"Successfully scaled deployment","scaledobject.Namespace":"<namespace>","scaledobject.Name":"<scaled-object-name>","scaler":<scaler-type>} | ||
``` |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.