b. Upgrade an operator release

These instructions apply to upgrading operators within the 3.x release family as additional versions are released.

The new WebLogic Kubernetes Operator Docker image must be installed on the master node AND each of the worker nodes in your Kubernetes cluster. Alternatively you can place the image in a Docker registry that your cluster can access.

  1. Pull the WebLogic Kubernetes Operator 3.X.X image by running the following command on the master node:

    $ docker pull oracle/weblogic-kubernetes-operator:3.X.X

    where 3.X.X is the version of the operator you require.

  2. Run the docker tag command as follows:

    $ docker tag oracle/weblogic-kubernetes-operator:3.X.X weblogic-kubernetes-operator:3.X.X

    where 3.X.X is the version of the operator downloaded.

    After installing the new WebLogic Kubernetes Operator Docker image, repeat the above on the worker nodes.

  3. On the master node, download the new WebLogic Kubernetes Operator source code from the operator github project:

    $ mkdir <work directory>/weblogic-kubernetes-operator-3.X.X
    $ cd <work directory>/weblogic-kubernetes-operator-3.X.X
    $ git clone https://github.com/oracle/weblogic-kubernetes-operator.git --branch v3.X.X 

    For example:

    $ mkdir /scratch/OIGDockerK8S/weblogic-kubernetes-operator-3.X.X
    $ cd /scratch/OIGDockerK8S/weblogic-kubernetes-operator-3.X.X
    $ git clone https://github.com/oracle/weblogic-kubernetes-operator.git --branch v3.X.X  

    This will create the directory <work directory>/weblogic-kubernetes-operator-3.X.X/weblogic-kubernetes-operator

  4. Run the following helm command to upgrade the operator:

    $ cd <work directory>/weblogic-kubernetes-operator-3.X.X/weblogic-kubernetes-operator
    $ helm upgrade --reuse-values --set image=oracle/weblogic-kubernetes-operator:3.X.X --namespace <sample-kubernetes-operator-ns> --wait weblogic-kubernetes-operator kubernetes/charts/weblogic-operator

    For example:

    $ cd /scratch/OIGDockerK8S/weblogic-kubernetes-operator-3.X.X/weblogic-kubernetes-operator
    $ helm upgrade --reuse-values --set image=oracle/weblogic-kubernetes-operator:3.X.X --namespace operator --wait weblogic-kubernetes-operator kubernetes/charts/weblogic-operator

    The output will look similar to the following:

    Release "weblogic-kubernetes-operator" has been upgraded. Happy Helming!
    NAME: weblogic-kubernetes-operator
    LAST DEPLOYED: Thu Oct 01 02:50:07 2020
    NAMESPACE: operator
    STATUS: deployed
    TEST SUITE: None