Create a TimesTenClassic Object

This section creates the TimesTenClassic object. See "Define and Create a TimesTenClassic Object" and "About the TimesTenClassic Object Type" for detailed information on the TimesTenClassic object.

Perform these steps:

  1. Create an empty YAML file. You can choose any name, but you may want to use the same name you used for the name of the TimesTenClassic object. (In this example, sample.) The YAML file contains the definitions for the TimesTenClassic object. See "TimesTenClassicSpecSpec" for information on the fields that you must specify in this YAML file as well as the fields that are optional.

    In this example, replace the following. (The values you can replace are represented in bold.)

    • name: Replace sample with the name of your TimesTenClassic object.

    • storageClassName: Replace oci-bv with the name of the storage class used to allocate PersistentVolumes to hold TimesTen.

    • storageSize: Replace 250Gi with the amount of storage that should be requested for each Pod to hold TimesTen. Note: This example assumes a production environment and uses a value of 250Gi for storageSize. For demonstration purposes, a value of 50Gi is adequate. See the storageSize and the logStorageSize entries in "Table 17-3" for information.

    • image: Replace container-registry.oracle.com/timesten/timesten:22.1.1.19.0 with the location and name of your image.

    • imagePullSecret: Replace sekret with the image pull secret that Kubernetes should use to fetch the TimesTen image.

    • dbConfigMap: This example uses one ConfigMap (called sample) for the db.ini, the adminUser, and the schema.sql metadata files. This ConfigMap will be included in the ProjectedVolume. This volume is mounted as /ttconfig in the TimesTen containers. See "Using ConfigMaps and Secrets" and "Example Using One ConfigMap" for information on ConfigMaps.

    % vi sample.yaml
    
    apiVersion: timesten.oracle.com/v1
    kind: TimesTenClassic
    metadata:
      name: sample
    spec:
      ttspec:
        storageClassName: oci-bv
        storageSize: 250Gi
        image: container-registry.oracle.com/timesten/timesten:22.1.1.19.0
        imagePullSecret: sekret
        dbConfigMap:
        - sample
    
  2. Use the kubectl create command to create the TimesTenClassic object from the contents of the YAML file (in this example, sample.yaml). Doing so begins the process of deploying your active standby pair of TimesTen databases in the Kubernetes cluster.
    % kubectl create -f sample.yaml
    configmap/sample created
    timestenclassic.timesten.oracle.com/sample created
    

You successfully created the TimesTenClassic object in the Kubernetes cluster. The process of deploying your TimesTen databases begins, but is not yet complete.