TimesTenオペレータのインストール

TimesTenコンテナ・イメージには、TimesTen Kubernetesオペレータ(TimesTenオペレータ)をインストールするためのTimesTen YAMLマニフェスト・ファイルおよびHelmチャートが含まれています。TimesTen YAMLマニフェスト・ファイルおよびHelmチャートを取得する方法の詳細は、「TimesTen YAMLマニフェスト・ファイルおよびHelmチャートの取得」を参照してください。

YAMLマニフェスト・ファイルを使用してTimesTenオペレータをインストールするインストール・プロセスは、次のステップで構成されます:
  • TimesTenオペレータのサービス・アカウント、ロールおよびロール・バインディングをインストールします:
    • service_account.yaml: このファイルは、TimesTenオペレータを正しく実行するために必要なロール・バインディング、ロールおよびサービス・アカウントを定義します。サービス・アカウントには、ロールを介して付与される一連の権限が定義されている必要があります。ロール・バインディングは、サービス・アカウントにロールを割り当てます。

    • service_account_cluster.yaml: 必須ではありませんが、このファイルをインストールすることをお薦めします。TimesTenオペレータの追加の特権および権限を定義します。ノード障害の検出時にTimesTenオペレータでTimesTenポッドおよびPVCを削除する場合は、これらの特権および権限が必要です。この機能の詳細は、「TimesTen Kubernetesオペレータによるノード障害の処理方法」を参照してください。

      このファイルをインストールする前に、#namespace: <NAMESPACE>を実際のネームスペースの名前に置き換えて変更する必要があります。この項の例では、この方法を示します。

  • カスタマイズ内容に応じてoperator.yamlファイルを変更します。この例では、変更内容は次のとおりです:
    • image: container-registry.oracle.com/timesten/timesten:latestをコンテナ・イメージに置き換えます。この例では、イメージをcontainer-registry.oracle.com/timesten/timesten:22.1.1.30.0に変更します。

    • imagePullSecrets: sekretをイメージ・プル・シークレットの名前に置き換えます。この例では、イメージ・プル・シークレットの名前は変更しません。

TimesTenオペレータをインストールします。

  1. YAMLマニフェスト・ファイルを含むディレクトリに移動します。この例では、kube_files/deployにファイルが含まれています。
    cd kube_files/deploy
  2. 必要なサービス・アカウント、ロールおよびロール・バインディングをインストールします。
    kubectl create -f service_account.yaml

    出力は、次のようになります。

    role.rbac.authorization.k8s.io/timesten-operator created
    serviceaccount/timesten-operator created
    rolebinding.rbac.authorization.k8s.io/timesten-operator created
  3. 次の手順を実行して、service_account_cluster.yaml YAMLファイルをインストールします:
    1. (オプション): service_account_cluster.yamlファイルの内容を表示します。
      cat service_account_cluster.yaml
      出力は、次のようになります。
      apiVersion: rbac.authorization.k8s.io/v1
      kind: ClusterRole
      metadata:
        name: timesten-operator
      rules:
      - apiGroups:
        - ""
        resources:
        - nodes
        verbs:
        - get
        - list
        - watch
      - apiGroups:
        - ""
        resources:
        - persistentvolumeclaims
        verbs:
        - get
        - list
        - watch
        - delete
      ---
      kind: ClusterRoleBinding
      apiVersion: rbac.authorization.k8s.io/v1
      metadata:
        name: timesten-operator
      subjects:
      - kind: ServiceAccount
        name: timesten-operator
        #namespace: <NAMESPACE>
      roleRef:
        kind: ClusterRole
        name: timesten-operator
        apiGroup: rbac.authorization.k8s.io
    2. テキスト・エディタを使用して、service_account_cluster.yamlファイルを変更します。#namespaceを見つけ、#を削除し、<namespace>を実際のネームスペースの名前(この例ではmynamespace)に置き換えます。
      vi service_account_cluster.yaml
      
      ...
      subjects:
      - kind: ServiceAccount
        name: timesten-operator
        namespace: mynamespace
      ...
    3. service_account_cluster.yamlファイルを保存して閉じます。
    4. service_account_cluster.yamlファイルをインストールします。
      kubectl create -f service_account_cluster.yaml
      出力は、次のようになります。
      clusterrole.rbac.authorization.k8s.io/timesten-operator created
      clusterrolebinding.rbac.authorization.k8s.io/timesten-operator created
  4. operator.yamlファイルを変更するには、次のように実行します:
    1. テキスト・エディタを使用して、operator.yamlファイルを変更します。

      次のように置き換えます:

      • image: container-registry.oracle.com/timesten/timesten:latestをイメージの名前に置き換えます。この例では、イメージの名前はcontainer-registry.oracle.com/timesten/timesten:22.1.1.30.0です。

      • imagePullSecrets: sekretをイメージ・プル・シークレットの名前に置き換えます。この例では、イメージ・プル・シークレットの名前はsekretです。

      vi 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.30.0
    2. operator.yamlファイルを保存し、閉じます。
  5. TimesTenオペレータのインストール
    kubectl create -f operator.yaml
  6. TimesTenオペレータが実行されていることを確認します。
    kubectl get pods
    出力は、次のようになります。
    NAME                                 READY   STATUS    RESTARTS   AGE
    timesten-operator-545d5f7fdb-xbdfw   1/1     Running   0          27s
おめでとうございます。ネームスペースにTimesTenオペレータが正常にインストールされました。これは稼働中です。TimesTenデータベースを作成する準備ができました。「TimesTen Classicデータベースの作成」を参照してください。