Saturday, March 16, 2024

Weblogic k8s operator - domain debugging

 HOWTO

Describe domain
$  kubectl -n sample-domain1-ns describe domain sample-domain1
Name:         sample-domain1
Namespace:    sample-domain1-ns
Labels:       weblogic.domainUID=sample-domain1
Annotations:  <none>
API Version:  weblogic.oracle/v9
Kind:         Domain
Metadata:
  Creation Timestamp:  2024-03-16T07:20:03Z
  Generation:          2
  Resource Version:    2948
  UID:                 8dc5eb07-aeca-43dc-adb9-086bd97e61c9
Spec:
  Clusters:
    Name:  sample-domain1-cluster-1
  Configuration:
    Model:
      Auxiliary Images:
        Image:                       phx.ocir.io/weblogick8s/quick-start-aux-image:v1
      Domain Type:                   WLS
      Runtime Encryption Secret:     sample-domain1-runtime-encryption-secret
    Override Distribution Strategy:  Dynamic
  Domain Home:                       /u01/domains/sample-domain1
  Domain Home Source Type:           FromModel
  Failure Retry Interval Seconds:    120
  Failure Retry Limit Minutes:       1440
  Http Access Log In Log Home:       true
  Image:                             container-registry.oracle.com/middleware/weblogic:14.1.1.0-11
  Image Pull Policy:                 IfNotPresent
  Image Pull Secrets:
    Name:                             weblogic-repo-credentials
  Include Server Out In Pod Log:      true
  Introspect Version:                 1
  Max Cluster Concurrent Shutdown:    1
  Max Cluster Concurrent Startup:     0
  Max Cluster Unavailable:            1
  Replace Variables In Java Options:  false
  Replicas:                           1
  Restart Version:                    1
  Server Pod:
    Env:
      Name:   JAVA_OPTIONS
      Value:  -Dweblogic.StdoutDebugEnabled=false
      Name:   USER_MEM_ARGS
      Value:  -Djava.security.egd=file:/dev/./urandom -Xms256m -Xmx512m 
    Resources:
      Requests:
        Cpu:            250m
        Memory:         768Mi
  Server Start Policy:  IfNeeded
  Web Logic Credentials Secret:
    Name:  sample-domain1-weblogic-credentials
Status:
  Clusters:
    Cluster Name:  cluster-1
    Conditions:
      Last Transition Time:  2024-03-16T07:44:51.848598Z
      Status:                True
      Type:                  Available
      Last Transition Time:  2024-03-16T07:44:51.848653Z
      Status:                True
      Type:                  Completed
    Label Selector:          weblogic.domainUID=sample-domain1,weblogic.clusterName=cluster-1
    Maximum Replicas:        5
    Minimum Replicas:        0
    Observed Generation:     2
    Ready Replicas:          1
    Replicas:                1
    Replicas Goal:           1
  Conditions:
    Last Transition Time:    2024-03-16T07:44:51.848475Z
    Status:                  True
    Type:                    Available
    Last Transition Time:    2024-03-16T07:44:51.848361Z
    Status:                  True
    Type:                    Completed
  Failed Introspection UID:  0bd431ef-b6ba-4d8e-93bd-611be705e03c
  Observed Generation:       2
  Replicas:                  1
  Servers:
    Health:
      Overall Health:  Not available
      Subsystems:
    Node Name:     minikube
    Pod Phase:     Running
    Pod Ready:     True
    Server Name:   admin-server
    State:         RUNNING
    State Goal:    RUNNING
    Cluster Name:  cluster-1
    Health:
      Overall Health:  Not available
      Subsystems:
    Node Name:     minikube
    Pod Phase:     Running
    Pod Ready:     True
    Server Name:   managed-server1
    State:         RUNNING
    State Goal:    RUNNING
    Cluster Name:  cluster-1
    Server Name:   managed-server2
    State:         SHUTDOWN
    State Goal:    SHUTDOWN
    Cluster Name:  cluster-1
    Server Name:   managed-server3
    State:         SHUTDOWN
    State Goal:    SHUTDOWN
    Cluster Name:  cluster-1
    Server Name:   managed-server4
    State:         SHUTDOWN
    State Goal:    SHUTDOWN
    Cluster Name:  cluster-1
    Server Name:   managed-server5
    State:         SHUTDOWN
    State Goal:    SHUTDOWN
  Start Time:      2024-03-16T07:20:04.243627Z
Events:
  Type     Reason       Age                 From               Message
  ----     ------       ----                ----               -------
  Normal   Created      25m                 weblogic.operator  Domain sample-domain1 was created.

Describe cluster
$ kubectl -n sample-domain1-ns describe cluster sample-domain1-cluster-1
Name:         sample-domain1-cluster-1
Namespace:    sample-domain1-ns
Labels:       weblogic.domainUID=sample-domain1
Annotations:  <none>
API Version:  weblogic.oracle/v1
Kind:         Cluster
Metadata:
  Creation Timestamp:  2024-03-16T07:20:04Z
  Generation:          2
  Resource Version:    3292
  UID:                 79c20a7a-1193-41d9-bdc4-2bf78d8350c0
Spec:
  Cluster Name:  cluster-1
  Replicas:      1
Status:
  Cluster Name:  cluster-1
  Conditions:
    Last Transition Time:  2024-03-16T07:51:07.078447Z
    Status:                False
    Type:                  Available
    Last Transition Time:  2024-03-16T07:51:07.078558Z
    Status:                False
    Type:                  Completed
  Label Selector:          weblogic.domainUID=sample-domain1,weblogic.clusterName=cluster-1
  Maximum Replicas:        5
  Minimum Replicas:        0
  Observed Generation:     2
  Ready Replicas:          1
  Replicas:                1
  Replicas Goal:           1
Events:
  Type     Reason              Age                 From               Message
  ----     ------              ----                ----               -------
  Normal   ClusterCreated      21m (x7 over 32m)   weblogic.operator  Cluster resource sample-domain1-cluster-1 was created.
  Normal   ClusterChanged      19m                 weblogic.operator  Cluster resource sample-domain1-cluster-1 was changed.
  Normal   ClusterAvailable    73s (x10 over 18m)  weblogic.operator  Cluster sample-domain1-cluster-1 is available: a sufficient number of its servers have reached the ready state.
  Normal   ClusterCompleted    73s (x10 over 18m)  weblogic.operator  Cluster sample-domain1-cluster-1 is complete because all of the following are true: there is no failure detected, there are no pending server shutdowns, and all servers expected to be running are ready and at their target image, auxiliary images, restart version, and introspect version.
  Warning  ClusterIncomplete   57s (x15 over 20m)  weblogic.operator  Cluster sample-domain1-cluster-1 is incomplete for one or more of the following reasons: there are failures detected, there are pending server shutdowns, or not all servers expected to be running are ready and at their target image, auxiliary images, restart version, and introspect version.
  Warning  ClusterUnavailable  57s (x15 over 20m)  weblogic.operator  Cluster sample-domain1-cluster-1 is unavailable: an insufficient number of its servers that are expected to be running are ready.";

workload distribution between managed servers

No comments:

Post a Comment