10.1 Patching and Upgrading an Image in 14.1.2
Learn how to patch or upgrade the Oracle HTTP Server (OHS) image used by an OHS 14.1.2 container.
The instructions in this section relate to patching or upgrading an existing 14.1.2
OHS container with a new container image.
- To show the version of the image the OHS container
is currently running, run the following
command:
For example:kubectl describe pod <pod> -n <namespace> | grep Image
The output will look similar to the following:kubectl describe pod ohs-domain-d5b648bc5-qsgts -n ohsns | grep Image
Image: container-registry.oracle.com/middleware/ohs_cpu:14.1.2.0-jdk17-ol8-<version> Image ID: 9a7199ac903114793d6ad1f320010c3dbd59a39ad9bc987d926d3422a68603e7
- If using an image from Oracle Container Registry, you must login to Oracle Container Registry, navigate to Middleware > ohs_cpu and accept the license agreement.
- Run the following command to update the container
with the new
image:
For example:kubectl set image deployment/ohs-domain -n <namespace> ohs=<new_image>
The output will look similar to the following:kubectl set image deployment/ohs-domain -n ohsns ohs=container-registry.oracle.com/middleware/ohs_cpu:14.1.2.0-jdk17-ol8-<new>
deployment.apps/ohs-domain image updated
Note:
This command will perform a rolling restart of the OHS container by shutting down the existing OHS container and starting a new one. - Run the following kubectl 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 ohsns
The existing OHS pod will move to aNAME READY STATUS RESTARTS AGE ohs-domain-5c9c9879d-kpt9j 0/1 ContainerCreating 0 8s ohs-domain-d5b648bc5-qsgts 1/1 Terminating 0 17h
STATUS
ofTerminating
and a new OHS pod will be started.To check what is happening while the pods are inContainerCreating
status, you can run:kubectl describe pod <podname> -n <namespace>
To check what is happening while the pods are in0/1 Running
status, you can run:kubectl logs -f <pod> -n <namespace>
Keep running thekubectl get pods -n <namespace>
command until the pod isRunning
and atREADY 1\1
:NAME READY STATUS RESTARTS AGE ohs-domain-5c9c9879d-kpt9j 1/1 Running 0 6m40s
- To show the OHS container is running the new image,
run the following
command:
For example:kubectl describe pod <pod> -n <namespace> | grep Image
The output will look similar to the following:kubectl describe pod ohs-domain-5c9c9879d-kpt9j -n ohsns | grep Image
Image: container-registry.oracle.com/middleware/ohs_cpu:14.1.2.0-jdk17-ol8-<new> Image ID: 118c5c3713ddd6804cb699ecd0c7bd4a26ebf7e1427c5351c63244b5eb74ca94