oracle / weblogic-kubernetes-operator

WebLogic Kubernetes Operator

Home Page:https://oracle.github.io/weblogic-kubernetes-operator/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

kubectl scale up fails- weblogic.validating.webhook validation error

rsureshbe81 opened this issue · comments

We have requirement to increase the pod count from 8 to 9 to handle production load, when we tried to scale up pod to 9 by running kubectl scale command (below), getting following error. Tried all options from oracle github nothing works. Please suggest how to increase pod count.

Command: kubectl scale --replicas=9 clusters/workout-dev-domain-dev-domain-cluster -n workout-dev

error: clusters.weblogic.oracle "workout-dev-domain-dev-domain-cluster" could not be patched: admission webhook "weblogic.validating.webhook" denied the request: Change request to cluster resource 'workout-dev-domain-cluster' cannot be honored because the replica count would exceed the cluster size '8'

WebLogic clusters have a maximum size that comes from the domain configuration (config.xml). The validation will not allow you to scale past this limit, so you must first increase the cluster size. Are you using model in image or domain on PV? Is this cluster configured or dynamic?

Thanks, I tried to increase the cluster size (using below commands), I see same error. Our weblogic domain is stored in Azure storage -Persistent volume. Its dynamic cluster.

kubectl edit cluster workout-dev-domain-workout-dev-domain-cluster -n workout-dev
kubectl patch cluster workout-dev-domain-workout-dev-domain-cluster --type=merge -p '{"spec":{"replicas":9}}' -n workout
workout
-dev

@rsureshbe81, you need to increase the dynamic cluster size, as described here: https://docs.oracle.com/en/middleware/standalone/weblogic-server/14.1.1.0/clust/dynamic_clusters.html#GUID-64235312-7A83-4866-8E8F-D4294C9E0FB1.

After this, you need to force the operator to reread the domain configuration. This is done during the phase called "introspection" which can be forced, as described here: https://oracle.github.io/weblogic-kubernetes-operator/managing-domains/domain-lifecycle/introspection/#initiating-introspection.

Finally, your scaling commands will now work up to the new maximum cluster size that you've selected.