You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
*[Calling the operator's REST scale API, for example, from `curl`](#calling-the-operators-rest-scale-api)
25
25
*[Kubernetes Horizontal Pod Autoscaler (HPA)](#kubernetes-horizontal-pod-autoscaler-hpa)
26
-
*[Using a WLDF policy rule and script action to call the operator's REST scale API](#using-a-wldf-policy-rule-and-script-action-to-call-the-operators-rest-scale-api)
27
-
*[Using a Prometheus alert action to call the operator's REST scale API](#using-a-prometheus-alert-action-to-call-the-operators-rest-scale-api)
26
+
*[Using a WLDF policy rule and script action to call the scaling script](#using-a-wldf-policy-rule-and-script-action-to-call-the-scaling-script)
27
+
*[Using a Prometheus alert action to call the scaling script](#using-a-prometheus-alert-action-to-call-the-scaling-script)
28
28
29
29
### `kubectl` CLI commands
30
30
Use the Kubernetes command-line tool, `kubectl`, to manually scale WebLogic clusters with the following commands:
For more in-depth information on the Kubernetes Horizontal Pod Autoscaler, see [Horizontal Pod Autoscaling](https://kubernetes.io/docs/tasks/run-application/horizontal-pod-autoscale/).
223
223
224
-
#### Using a WLDF policy rule and script action to call the operator's REST scale API
224
+
#### Using a WLDF policy rule and script action to call the scaling script
225
225
The WebLogic Diagnostics Framework (WLDF) is a suite of services and APIs that collect and surface metrics that provide visibility into server and application performance.
226
226
To support automatic scaling of WebLogic clusters in Kubernetes, WLDF provides the Policies and Actions component, which lets you write policy expressions for automatically executing scaling
227
227
operations on a cluster. These policies monitor one or more types of WebLogic Server metrics, such as memory, idle threads, and CPU load. When the configured threshold
228
228
in a policy is met, the policy is triggered, and the corresponding scaling action is executed. The WebLogic Kubernetes Operator project provides a shell script, [`scalingAction.sh`](https://github.com/oracle/weblogic-kubernetes-operator/blob/{{< latestMinorVersion >}}/kubernetes/samples/scripts/scaling/scalingAction.sh),
229
-
for use as a Script Action, which illustrates how to issue a request to the operator’s REST endpoint.
230
-
231
-
{{% notice note %}}
232
-
Beginning with operator version 4.0.5, the operator's REST endpoint is disabled by default. Install the operator with the Helm install option `--set "enableRest=true"` to enable the REST endpoint.
233
-
{{% /notice %}}
229
+
for use as a Script Action, which initiates a scaling of the selected cluster.
234
230
235
231
##### Configure automatic scaling of WebLogic clusters in Kubernetes with WLDF
236
-
The following steps are provided as a guideline on how to configure a WLDF Policy and Script Action component for issuing scaling requests to the operator's REST endpoint:
232
+
The following steps are provided as a guideline on how to configure a WLDF Policy and Script Action component for issuing scaling requests:
237
233
238
234
1. Copy the [`scalingAction.sh`](https://github.com/oracle/weblogic-kubernetes-operator/blob/{{< latestMinorVersion >}}/kubernetes/samples/scripts/scaling/scalingAction.sh) script to `$DOMAIN_HOME/bin/scripts` so that it's accessible within the Administration Server pod. For more information, see [Configuring Script Actions](https://docs.oracle.com/en/middleware/standalone/weblogic-server/14.1.1.0/wldfc/config_notifications.html#GUID-5CC52534-13CD-40D9-915D-3380C86580F1) in _Configuring and Using the Diagnostics Framework for Oracle WebLogic Server_.
239
235
@@ -244,23 +240,6 @@ see [Configuring Policies and Actions](https://docs.oracle.com/en/middleware/sta
244
240
245
241
b. Configure a WLDF script action and associate the [`scalingAction.sh`](https://github.com/oracle/weblogic-kubernetes-operator/blob/{{< latestMinorVersion >}}/kubernetes/samples/scripts/scaling/scalingAction.sh) script.
246
242
247
-
Important notes about the configuration properties for the Script Action:
248
-
249
-
The `scalingAction.sh` script requires access to the SSL certificate of the operator’s endpoint and this is provided through the environment variable `INTERNAL_OPERATOR_CERT`.
250
-
The operator’s SSL certificate can be found in the `internalOperatorCert` entry of the operator’s ConfigMap `weblogic-operator-cm`:
The scalingAction.sh script accepts a number of customizable parameters:
265
244
266
245
*`action` - scaleUp or scaleDown (Required)
@@ -279,12 +258,6 @@ Set this to `https://${KUBERNETES_SERVICE_HOST}:${KUBERNETES_SERVICE_PORT}` when
279
258
280
259
*`wls_domain_namespace` - Kubernetes Namespace in which the WebLogic domain is defined, default=`default`
281
260
282
-
*`operator_service_name` - WebLogic Kubernetes Operator Service name of the REST endpoint, default=`internal-weblogic-operator-service`
283
-
284
-
*`operator_service_account` - Kubernetes Service Account name for the operator, default=`weblogic-operator`
285
-
286
-
*`operator_namespace` – Namespace in which the operator is deployed, default=`weblogic-operator`
287
-
288
261
*`scaling_size` – Incremental number of Managed Server instances by which to scale up or down, default=`1`
289
262
290
263
You can use any of the following tools to configure policies for diagnostic system modules:
@@ -294,7 +267,7 @@ You can use any of the following tools to configure policies for diagnostic syst
294
267
* REST
295
268
* JMX application
296
269
297
-
A more in-depth description and example on using WLDF's Policies and Actions component for initiating scaling requests through the operator's REST endpoint can be found in the blogs:
270
+
A more in-depth description and example on using WLDF's Policies and Actions component for initiating scaling requests can be found in the blogs:
298
271
299
272
*[Automatic Scaling of WebLogic Clusters on Kubernetes](https://blogs.oracle.com/weblogicserver/automatic-scaling-of-weblogic-clusters-on-kubernetes-v2)
300
273
*[WebLogic Dynamic Clusters on Kubernetes](https://blogs.oracle.com/weblogicserver/weblogic-dynamic-clusters-on-kubernetes)
#### Horizontal Pod Autoscaler (HPA) using WebLogic Exporter Metrics
361
331
Please read this blog post to learn how to scale a WebLogic cluster, based on WebLogic metrics provided by the Monitoring Exporter, using the Kubernetes Horizontal Pod Autoscaler (HPA). We will use the Prometheus Adapter to gather the names of the available metrics from Prometheus at regular intervals. A custom configuration of the adapter will expose only metrics that follow specific formats. [Horizontal Pod Autoscaler (HPA) using WebLogic Exporter Metrics](https://blogs.oracle.com/weblogicserver/post/horizontal-pod-autoscaler-hpausing-weblogic-exporter-metrics). See this corresponding video for a demonstration of the blog post in action. [WebLogic Kubernetes Operator support for Kubernetes Horizontal Pod Autoscaling](https://www.youtube.com/watch?v=aKBG6yJ3sMg).
362
332
363
-
#### Using a Prometheus alert action to call the operator's REST scale API
333
+
#### Using a Prometheus alert action to call the scaling script
364
334
In addition to using the WebLogic Diagnostic Framework for automatic scaling of a dynamic cluster,
365
335
you can use a third-party monitoring application like Prometheus. Please read the following blog for
366
336
details about [Using Prometheus to Automatically Scale WebLogic Clusters on Kubernetes](https://blogs.oracle.com/weblogicserver/using-prometheus-to-automatically-scale-weblogic-clusters-on-kubernetes-v5).
0 commit comments