Create Non-Replicated TimesTen Classic Databases
- Create the YAML manifest file for the TimesTenClassic object.
vi norepsample.yaml apiVersion: timesten.oracle.com/v4 kind: TimesTenClassic metadata: name: norepsample spec: ttspec: storageClassName: oci-bv storageSize: 10Gi image: container-registry.oracle.com/timesten/timesten:22.1.1.34.0 imagePullSecret: sekret replicationTopology: none replicas: 3 dbConfigMap: - norepsample
Note the following:-
The
storageClassName
isoci-bv
. Replaceoci-bv
with the name of your storage class. -
The
storageSize
is10Gi
. Replace10Gi
with the amount of storage that needs to be requested for each Pod to hold TimesTen. -
The
image
iscontainer-registry.oracle.com/timesten/timesten:22.1.1.34.0
. Replaceimage
with the name and location of your TimesTen container image. -
The
imagePullSecret
issekret
. Replacesekret
with the image pull secret that Kubernetes needs to use to fetch the TimesTen container image. - The
replicationTopology
isnone
. Do not change this setting for non-replicated configurations. - The
replicas
value is3
. Replace3
with the number of TimesTen Pods (each containing a TimesTen database) to provision. The value must be between1
and3
. If you omitreplicas
, the default is1
. - The
dbConfigMap
specifies thenorepsample
ConfigMap created in About the Examples.
-
- Deploy the TimesTenClassic object into your namespace.
kubectl create -f norepsample.yaml
The output is the following:timestenclassic.timesten.oracle.com/norepsample created
- Monitor deployment.
- Check status of object.
kubectl get ttc norepsample
The output is similar to the following:
NAME STATE ACTIVE AGE norepsample NoReplicasReady N/A 43s
The provisioning starts, but is not completed as indicated by the
NoReplicasReady
state. - Wait a few minutes. Then, check status again.
kubectl get ttc norepsample
The output is similar to the following:
NAME STATE ACTIVE AGE norepsample SomeReplicasReady N/A 74s
The provisioning continues. As evidenced by the
SomeReplicasReady
state, some of the databases are ready, but not all. - Check the status again.
kubectl get ttc norepsample
The output is similar to the following:NAME STATE ACTIVE AGE norepsample AllReplicasReady N/A 2m54s
The provisioning process completes. Databases are up and running and operational. The TimesTen Operator transitions the
norepsample
object to theAllReplicasReady
state.
- Check status of object.
- (Optional) Review the state transitions.
kubectl get events
The output is similar to the following:
LAST SEEN TYPE REASON OBJECT MESSAGE ... 6m6s Normal Create timestenclassic/norepsample Service norepsample created 6m6s Warning Warning timestenclassic/norepsample Database CPU limit/request not specified 6m6s Normal Create timestenclassic/norepsample StatefulSet norepsample created 6m6s Warning Create timestenclassic/norepsample PodMonitor norepsample created 6m6s Normal StateChange timestenclassic/norepsample TimesTenClassic was Initializing, now NoReplicasReady 5m10s Normal Info timestenclassic/norepsample Pod norepsample-0 Agent Up 5m10s Normal Info timestenclassic/norepsample Pod norepsample-0 Release 22.1.1.34.0 5m10s Normal Info timestenclassic/norepsample Pod norepsample-0 Instance Exists 5m10s Normal Info timestenclassic/norepsample Pod norepsample-0 Daemon Down 5m9s Normal Info timestenclassic/norepsample Pod norepsample-0 Daemon Up 5m9s Normal Info timestenclassic/norepsample Pod norepsample-0 Database None 4m59s Normal Info timestenclassic/norepsample Pod norepsample-0 Database Loaded 4m58s Normal Info timestenclassic/norepsample Pod norepsample-0 Database Updatable 4m58s Normal Info timestenclassic/norepsample Pod norepsample-0 RepAgent Not Running 4m58s Normal StateChange timestenclassic/norepsample Pod norepsample-0 is Ready 4m58s Normal StateChange timestenclassic/norepsample Pod norepsample-0 state was Initializing, now Normal 4m58s Normal StateChange timestenclassic/norepsample TimesTenClassic was NoReplicasReady, now SomeReplicasReady 4m48s Normal Info timestenclassic/norepsample Pod norepsample-2 Agent Up 4m48s Normal Info timestenclassic/norepsample Pod norepsample-2 Release 22.1.1.34.0 4m48s Normal Info timestenclassic/norepsample Pod norepsample-2 Instance Exists 4m48s Normal Info timestenclassic/norepsample Pod norepsample-2 Daemon Down 4m48s Normal Info timestenclassic/norepsample Pod norepsample-2 Daemon Up 4m48s Normal Info timestenclassic/norepsample Pod norepsample-2 Database None 3m37s Normal Info timestenclassic/norepsample Pod norepsample-2 Database Loaded 3m37s Normal Info timestenclassic/norepsample Pod norepsample-2 Database Updatable 3m37s Normal Info timestenclassic/norepsample Pod norepsample-2 RepAgent Not Running 3m37s Normal StateChange timestenclassic/norepsample Pod norepsample-2 is Ready 3m37s Normal StateChange timestenclassic/norepsample Pod norepsample-2 state was Initializing, now Normal 3m37s Normal Info timestenclassic/norepsample Pod norepsample-1 Agent Up 3m37s Normal Info timestenclassic/norepsample Pod norepsample-1 Release 22.1.1.34.0 3m37s Normal Info timestenclassic/norepsample Pod norepsample-1 Instance Exists 3m37s Normal Info timestenclassic/norepsample Pod norepsample-1 Daemon Down 3m36s Normal Info timestenclassic/norepsample Pod norepsample-1 Daemon Up 3m36s Normal Info timestenclassic/norepsample Pod norepsample-1 Database None 3m30s Normal Info timestenclassic/norepsample Pod norepsample-1 Database Loaded 3m30s Normal Info timestenclassic/norepsample Pod norepsample-1 Database Updatable 3m30s Normal Info timestenclassic/norepsample Pod norepsample-1 RepAgent Not Running 3m30s Normal StateChange timestenclassic/norepsample Pod norepsample-1 is Ready 3m30s Normal StateChange timestenclassic/norepsample Pod norepsample-1 state was Initializing, now Normal 3m30s Normal StateChange timestenclassic/norepsample TimesTenClassic was SomeReplicasReady, now AllReplicasReady
During the provisioning process, the TimesTenClassic object and TimesTen Pods transition from and to various states.
- Verify the existence of the underlying objects.
1. StatefulSet:
kubectl get statefulset norepsample
The output is similar to the following:
NAME READY AGE norepsample 3/3 8m30s
2. Service:
kubectl get service norepsample
The output is similar to the following:
NAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGE norepsample ClusterIP None <none> 6625/TCP,8888/TCP 8m58s
3. Pods:
kubectl get pods
The output is similar to the following:
NAME READY STATUS RESTARTS AGE norepsample-0 3/3 Running 0 9m15s norepsample-1 3/3 Running 0 9m15s norepsample-2 3/3 Running 0 9m15s ...
4. PVCs:
kubectl get pvc
The output is similar to the following:
NAME STATUS VOLUME CAPACITY ACCESS MODES STORAGECLASS AGE tt-persistent-norepsample-0 Bound csi-00bf2a2e-ef70-4f41-a3ef-66341f7404ac 250Gi RWO oci-bv 9m34s tt-persistent-norepsample-1 Bound csi-516d9ef4-9492-4927-b483-05f7d320cc73 250Gi RWO oci-bv 9m34s tt-persistent-norepsample-2 Bound csi-99c95d75-f9d9-4754-9378-0c5a7d288871 250Gi RWO oci-bv 9m34s
- Connect to one of the databases.
- From your development host, establish a shell in the Pod.
kubectl exec -it norepsample-0 -c tt -- /bin/bash
- Connect to the database. Insert a row in a table.
ttIsql norepsample Copyright (c) 1996, 2025, Oracle and/or its affiliates. All rights reserved. Type ? or "help" for help, type "exit" to quit ttIsql. connect "DSN=norepsample"; Connection successful: DSN=norepsample;UID=timesten;DataStore=/tt/home/timesten/datastore/norepsample;DatabaseCharacterSet=AL32UTF8;ConnectionCharacterSet=US7ASCII;AutoCreate=0;PermSize=200;DDLReplicationLevel=3;ForceDisconnectEnabled=1; (Default setting AutoCommit=1) Command> select * from adminuser.emp; 0 rows found. Command> describe adminuser.emp; Table ADMINUSER.EMP: Columns: *ID NUMBER NOT NULL NAME CHAR (32) PRIMARY KEY (ID) RANGE INDEX 1 table found. (primary key columns are indicated with *) Command> insert into adminuser.emp values (1,'test'); 1 row inserted. Command> commit; Command> select * from adminuser.emp; < 1, test > 1 row found.
- Exit from
ttIsql
and from the shell.Command> exit Disconnecting... Done. [timesten@norepsample-0 ~]$ exit exit
- From your development host, establish a shell in the Pod.