a. Patch an image

To update your OAM Kubernetes cluster with a new OAM Docker image, first install the new Docker image on all nodes in your Kubernetes cluster.

Once the new image is installed, choose one of the following options to update your OAM kubernetes cluster to use the new image:

  1. Run the kubectl edit domain command
  2. Run the kubectl patch domain command

In all of the above cases, the WebLogic Kubernetes Operator will restart the Administration Server pod first and then perform a rolling restart on the OAM Managed Servers.

Run the kubectl edit domain command

  1. To update the domain with the kubectl edit domain command, run the following:

    $ kubectl edit domain <domainname> -n <namespace>
    

    For example:

    $ kubectl edit domain accessdomain -n oamns
    
  2. Update the image tag to point at the new image, for example:

    domainHomeInImage: false
    image: oracle/oam:12.2.1.4.0-new
    imagePullPolicy: IfNotPresent
    
  3. Save the file and exit (:wq!)

Run the kubectl patch command

  1. To update the domain with the kubectl patch domain command, run the following:

    $ kubectl patch domain <domain> -n <namespace> --type merge  -p '{"spec":{"image":"newimage:tag"}}'
    

    For example:

    $ kubectl patch domain accessdomain -n oamns --type merge  -p '{"spec":{"image":"oracle/oam:12.2.1.4-new"}}'
    

    The output will look similar to the following:

    domain.weblogic.oracle/accessdomain patched