Install the TimesTen Operator at Cluster-Scope

The examples in this section assume you have obtained the YAML manifest files. See Obtain TimesTen YAML Manifest Files and Helm Charts.

Let's install the TimesTen Operator at cluster-scope. As part of the installation, the timesten-operator namespace is created. The TimesTen Operator runs in this namespace in your Kubernetes cluster at cluster-scope. Once installed, this TimesTen Operator services TimesTenClassic objects in all namespaces in your cluster.

  1. Change to the directory that contains the YAML manifest files. In this example, the kube_files/deploy contains the files.
    cd kube_files/deploy
  2. Create the necessary privileges to run the TimesTen Operator.
    kubectl create -f cluster_config.yaml

    The output is similar to the following

    namespace/timesten-operator created
    clusterrole.rbac.authorization.k8s.io/timesten-operator created
    serviceaccount/timesten-operator created
    clusterrolebinding.rbac.authorization.k8s.io/timesten-operator created

    Installing this file results in the creation of the timesten-operator namespace.

  3. Create a Kubernetes Secret in the timesten-operator namespace. This Kubernetes Secret is used as an image pull secret and is required so that the TimesTen Operator can pull a TimesTen container image from an image registry. This example creates the sekret Secret.
    kubectl create secret generic sekret --from-file=.dockerconfigjson=$HOME/.docker/config.json --type=kubernetes.io/dockerconfigjson -n timesten-operator

    The output is the following:

    secret/sekret created

    For more information about creating Kubernetes Secrets, see Pulling Images from Registry during Deployment in the Kubernetes documentation.

  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 your image. In this example, the name of the image is container-registry.oracle.com/timesten/timesten:22.1.1.34.0.

      • imagePullSecrets: Replace sekret with the name of your image pull secret you created in the prior step. In this example, the name of the image pull secret is sekret.

      • If you are running in a multi-architecture environment, modify the affinity section, and specify either amd64 or arm64. This example assumes you are running in a multi-architecture environment and sets nodes to 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.34.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. Install the TimesTen Operator.
    kubectl create -f cluster_operator.yaml

    The output is the following:

    deployment.apps/timesten-operator created
  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-6bf76dd84b-c8j59   1/1     Running   0          3m57s

Congratulations! You installed the TimesTen Operator. It is running in the timesten-operator namespace in your Kubernetes cluster at cluster-scope. The TimesTen Operator services TimesTenClassic objects in all namespaces in your Kubernetes cluster.

You are now ready to create TimesTen databases in your namespaces. See Create TimesTen Classic Databases.