Upgrade the TimesTen Operator at Cluster-Scope

The examples in this section assume you have obtained the YAML manifest files for the upgrade. See About Obtaining Container Images for the Upgrade. If you are using Helm charts for the upgrade, see Overview of Helm and TimesTen Helm Charts.

Let's walk through the steps to upgrade the TimesTen Operator at cluster-scope.

  1. Confirm the TimesTen Operator is running at cluster-scope.
    1. Confirm there is a TimesTen Operator running in the timesten-operator namespace.
      kubectl get pods -l name=timesten-operator -A

      The output is similar to the following:

      NAMESPACE           NAME                                 READY   STATUS    RESTARTS   AGE
      timesten-operator   timesten-operator-6bf76dd84b-c8j59   1/1     Running   0          2d4h

      There is a TimesTen Operator running in the timesten-operator namespace.

    2. Verify the TimesTen Operator Deployment has the TT_OPERATOR_SCOPE environment variable set to cluster.
      kubectl describe deployment timesten-operator -n timesten-operator | grep TT_OPERATOR_SCOPE
      The output is the following:
            TT_OPERATOR_SCOPE:               cluster
  2. Change to the directory that contains the YAML manifest files for the upgrade. In this example, the new_kube_files/deploy directory contains the files.
    cd new_kube_files/deploy
  3. Upgrade the service account, cluster role, and cluster rolebinding objects.
     kubectl replace -f cluster_config.yaml
    The output is similar to the following:
    namespace/timesten-operator replaced
    clusterrole.rbac.authorization.k8s.io/timesten-operator replaced
    serviceaccount/timesten-operator replaced
    clusterrolebinding.rbac.authorization.k8s.io/timesten-operator replaced
  4. Modify the cluster_operator.yaml file by doing the following:
    1. Use a text editor to modify the cluster_operator.yaml file.

      Replace the following:

      • image: Replace container-registry.oracle.com/timesten/timesten:latest with the name of the image for the upgrade. In this example, the name of the image for the upgrade is container-registry.oracle.com/timesten/timesten:22.1.1.35.0.

      • If you are running in a multi-architecture environment, modify the affinity section, using the same setting you used during installation. This example uses amd64.

      vi cluster_operator.yaml
      
      # Copyright (c) 2019 - 2025, Oracle and/or its affiliates.
      apiVersion: apps/v1
      kind: Deployment
      metadata:
        name: timesten-operator
      spec:
        replicas: 1
      ...
          spec:
            serviceAccountName: timesten-operator
            imagePullSecrets:
            - name: sekret
            containers:
              - name: timesten-operator
                image: container-registry.oracle.com/timesten/timesten:22.1.1.35.0
      ...
      # An example affinity definition; this pod will only be assigned to a node
      # running on amd64 (the default)
      #
            affinity:
              nodeAffinity:
                requiredDuringSchedulingIgnoredDuringExecution:
                  nodeSelectorTerms:
                    - matchExpressions:
                      - key: "kubernetes.io/arch"
                        operator: In
                        values: ["amd64"]
    2. Save and close the cluster_operator.yaml file.
  5. Upgrade the TimesTen Operator.
    kubectl replace -f cluster_operator.yaml
    The output is the following:
    deployment.apps/timesten-operator replaced
  6. Verify the TimesTen Operator is running in the timesten-operator namespace.
    kubectl get pods -n timesten-operator

    The output is similar to the following:

    NAME                                 READY   STATUS    RESTARTS   AGE
    timesten-operator-5cf4b68d58-5cn6t   1/1     Running   0          54s
  7. (Optional) Verify the TimesTen Operator is running the new image.
    kubectl describe deployment timesten-operator -n timesten-operator| grep Image

    The output is the following:

    Image:       container-registry.oracle.com/timesten/timesten:22.1.1.35.0

Congratulations! You successfully upgraded the TimesTen Operator. The Operator is running in the timesten-operator namespace in your Kubernetes cluster at cluster-scope. The Operator is using the container-registry.oracle.com/timesten/timesten:22.1.1.35.0 image.

If you are ready to upgrade TimesTenClassic objects, proceed to About Upgrading TimesTen Classic Databases.