Perform a Manual Upgrade of a Non-Replicated TimesTenClassic Object
- Review the TimesTenClassic objects running in your namespace.
kubectl get ttcThe output is similar to the following:
NAME STATE ACTIVE AGE mannorepsample AllReplicasReady N/A 3m32s norepsample AllReplicasReady N/A 11h repsample Normal repsample-0 5d19hOne of the non-replicated TimesTenClassic objects is
mannorepsample. Its high level state isAllReplicasReady. - Review the image upgrade strategy for this object.
kubectl get ttc mannorepsample -o yaml | grep imageUpgradeStrategyThe output is the following:
imageUpgradeStrategy: ManualThe image upgrade strategy is
Manual. Let's perform an upgrade. - On your development host, edit the TimesTenClassic object's
.spec.ttspec.imagedatum with the container image you want to use for the upgrade. This example usescontainer-registry.oracle.com/timesten/timesten:22.1.1.35.0.- Edit the file, replacing the
imagevalue withcontainer-registry.oracle.com/timesten/timesten:22.1.1.35.0.kubectl edit ttc mannorepsample # Please edit the object below. Lines beginning with a '#' will be ignored, # and an empty file will abort the edit. If an error occurs while saving this file will be # reopened with the relevant failures. # apiVersion: timesten.oracle.com/v4 kind: TimesTenClassic ... image: container-registry.oracle.com/timesten/timesten:22.1.1.35.0 ... - Save the file and exit from the editor.
When the TimesTen Operator detects that there is an update to the TimesTenClassic's
.spec.ttspec.imagedatum, it modifies the StatefulSet with the new image. Since this is a manual upgrade of a non-replicated object, the TimesTen Operator and Kubernetes take no further action. - Edit the file, replacing the
- (Optional) Confirm the StatefulSet contains the new image.
kubectl describe statefulset mannorepsample | grep ImageThe output is the following:
Image: container-registry.oracle.com/timesten/timesten:22.1.1.35.0 Image: container-registry.oracle.com/timesten/timesten:22.1.1.35.0 Image: container-registry.oracle.com/timesten/timesten:22.1.1.35.0 Image: container-registry.oracle.com/timesten/timesten:22.1.1.35.0The containers including
tt,daemonlog, andexportercontain the new image. - Review the Pods for the TimesTenClassic object.
kubectl get podsThe output is similar to the following:
NAME READY STATUS RESTARTS AGE mannorepsample-0 3/3 Running 0 26m mannorepsample-1 3/3 Running 0 26m mannorepsample-2 3/3 Running 0 26m ...There are three Pods associated with the TimesTenClassic object. Each Pod is running a TimesTen database. The databases are independent and have no relationship to each other.
- Delete the
mannorepsample-2Pod. This action causes Kubernetes to terminate the Pod and replace it with a new one.kubectl delete pod mannorepsample-2 - Monitor the progress.
kubectl get ttc mannorepsampleThe output is the following:
NAME STATE ACTIVE AGE mannorepsample SomeReplicasReady N/A 49mThe object is in the
SomeReplicasReadystate.Wait a few minutes. Then monitor again.
kubectl get ttc mannorepsampleThe output is the following:
NAME STATE ACTIVE AGE mannorepsample AllReplicasReady N/A 53mThe object is in the
AllReplicasReadystate. All replicas are ready and available. TimesTen databases are up and running and functioning properly. - Check the image that the
mannorepsample-2Pod is running.kubectl describe pod mannorepsample-2 | grep ImageThe output is similar to the following:Image: container-registry.oracle.com/timesten/timesten:22.1.1.35.0 Image: container-registry.oracle.com/timesten/timesten:22.1.1.35.0 Image: container-registry.oracle.com/timesten/timesten:22.1.1.35.0 Image: container-registry.oracle.com/timesten/timesten:22.1.1.35.0The containers in the Pod are running the new container image.
- Delete the remaining Pods.
kubectl delete pod mannorepsample-1kubectl delete pod mannorepsample-0 - Monitor the progress.
kubectl get podsThe output is similar to the following:
NAME READY STATUS RESTARTS AGE mannorepsample-0 0/3 Init:0/1 0 13s mannorepsample-1 0/3 Init:0/1 0 60s ...Kubernetes starts recreating the Pods.
Wait a few minutes. Then monitor again.
kubectl get podsThe output is the following:
NAME READY STATUS RESTARTS AGE mannorepsample-0 3/3 Running 0 1m16s mannorepsample-1 3/3 Running 0 2m3s mannorepsample-2 3/3 Running 0 6m32s ...The
mannorepsample-0andmannorepsample-1Pods are now running. Themannorepsample-2has already been running. - Confirm the Pods are running the new container image.
Pod
mannorepsample-0:kubectl describe pod mannorepsample-0 | grep ImageThe output is similar to the following:
Image: container-registry.oracle.com/timesten/timesten:22.1.1.35.0 Image: container-registry.oracle.com/timesten/timesten:22.1.1.35.0 Image: container-registry.oracle.com/timesten/timesten:22.1.1.35.0 Image: container-registry.oracle.com/timesten/timesten:22.1.1.35.0Pod
mannorepsample-1:kubectl describe pod mannorepsample-1 | grep ImageThe output is similar to the following:
Image: container-registry.oracle.com/timesten/timesten:22.1.1.35.0 Image: container-registry.oracle.com/timesten/timesten:22.1.1.35.0 Image: container-registry.oracle.com/timesten/timesten:22.1.1.35.0 Image: container-registry.oracle.com/timesten/timesten:22.1.1.35.0The Pods are running the new image.
- (Optional) Confirm the state of the TimesTenClassic object.
kubectl get ttc mannorepsampleThe output is similar to the following:
NAME STATE ACTIVE AGE mannorepsample AllReplicasReady N/A 79m - Verify the databases are running the correct release.
- Establish a shell in the
-0Pod.kubectl exec -it mannorepsample-0 -c tt -- /bin/bash - Run the TimesTen
ttVersionutility.ttVersionThe output is similar to the following:TimesTen Release 22.1.1.35.0 (64 bit Linux/x86_64) (instance1:6624) 2025-01-16T15:16:01Z Instance admin: timesten Instance home directory: /tt/home/timesten/instances/instance1 Group owner: timesten Daemon home directory: /tt/home/timesten/instances/instance1/info PL/SQL enabled. - Exit from the shell.
- Establish a shell in the
-1Pod.kubectl exec -it mannorepsample-1 -c tt -- /bin/bash - Run the TimesTen
ttVersionutility.ttVersionThe output is similar to the following:TimesTen Release 22.1.1.35.0 (64 bit Linux/x86_64) (instance1:6624) 2025-01-16T15:16:01Z Instance admin: timesten Instance home directory: /tt/home/timesten/instances/instance1 Group owner: timesten Daemon home directory: /tt/home/timesten/instances/instance1/info PL/SQL enabled. - Exit from the shell.
- Establish a shell in the
-2Pod.kubectl exec -it mannorepsample-2 -c tt -- /bin/bash - Run the TimesTen
ttVersionutility.ttVersionThe output is similar to the following:TimesTen Release 22.1.1.35.0 (64 bit Linux/x86_64) (instance1:6624) 2025-01-16T15:16:01Z Instance admin: timesten Instance home directory: /tt/home/timesten/instances/instance1 Group owner: timesten Daemon home directory: /tt/home/timesten/instances/instance1/info PL/SQL enabled. - Exit from the shell.
The TimesTen databases are running the correct release of TimesTen. - Establish a shell in the
Congratulations! You successfully performed a manual upgrade for a non-replicated TimesTenClassic object. All replicas are ready and available. Pods are running the new TimesTen container image. TimesTen databases are upgraded and fully operational.