12.4 Stopping the OAM Domain
Stopping the Oracle Access Management (OAM) domain shuts down all the OAM servers and the Administration Server in one operation.
To stop the OAM domain:
- Run the following kubectl command to edit the
domain:
For example:kubectl edit domain <domain_uid> -n <domain_namespace>
kubectl edit domain accessdomain -n oamns
- In the edit session, search for
serverStartPolicy: IfNeeded
under the domain spec:... volumeMounts: - mountPath: /u01/oracle/user_projects/domains name: weblogic-domain-storage-volume volumes: - name: weblogic-domain-storage-volume persistentVolumeClaim: claimName: accessdomain-domain-pvc serverStartPolicy: IfNeeded ...
- Change
serverStartPolicy: IfNeeded
toNever
as follows:... volumeMounts: - mountPath: /u01/oracle/user_projects/domains name: weblogic-domain-storage-volume volumes: - name: weblogic-domain-storage-volume persistentVolumeClaim: claimName: accessdomain-domain-pvc serverStartPolicy: Never ...
- Save the file and exit (
:wq!
). - Run the following command to view the
pods:
For example:kubectl get pods -n <domain_namespace>
The output will look similar to the following:kubectl get pods -n oamns
The Administration Server pods and OAM server pods will move to aNAME READY STATUS RESTARTS AGE accessdomain-adminserver 1/1 Terminating 0 3h52m accessdomain-oam-policy-mgr1 1/1 Terminating 0 3h44m accessdomain-oam-server1 1/1 Terminating 0 3h44m
STATUS
ofTerminating
. After a few minutes, run the command again and the pods should have disappeared. - To start the Administration Server and Managed Servers up again, repeat the previous
steps but change
serverStartPolicy: Never
toIfNeeded
as follows:... volumeMounts: - mountPath: /u01/oracle/user_projects/domains name: weblogic-domain-storage-volume volumes: - name: weblogic-domain-storage-volume persistentVolumeClaim: claimName: accessdomain-domain-pvc serverStartPolicy: IfNeeded ...
- Run the following command to view the
pods:
For example:kubectl get pods -n <domain_namespace>
The output will look similar to the following:kubectl get pods -n oamns
The introspect job will start, followed by the Administration Server pod, and then the OAM server pods. This process will take several minutes, so keep executing the command until all the pods are running withNAME READY STATUS RESTARTS AGE accessdomain-introspector-jwqxw 1/1 Running 0 10s
READY
status1/1
:Note:
Alternatively, you can add the watch flag,-w
, which allows you watch the status of the pods as they change.NAME READY STATUS RESTARTS AGE accessdomain-adminserver 1/1 Running 0 10m accessdomain-oam-policy-mgr1 1/1 Running 0 7m35s accessdomain-oam-server1 1/1 Running 0 7m35s