Install in Namespace Two
mynamespace2 in your Kubernetes cluster at namespace-scoped.
- Confirm the namespaces.
kubectl get namespacesThe output is similar to the following:NAME STATUS AGE mynamespace Active 16d ... mynamespace2 Active 19h - Switch to namespace two (
mynamespace2, in this example).kubectl config set-context --current --namespace=mynamespace2The output is similar to the following:
Context "default" modified. - Change to the directory that contains the YAML manifest files. In this example, the
kube_files/deploycontains the files.cd kube_files/deploy - Install the required service account, role, and role binding.
kubectl create -f service_account.yamlThe output is similar to the following:
role.rbac.authorization.k8s.io/timesten-operator created serviceaccount/timesten-operator created rolebinding.rbac.authorization.k8s.io/timesten-operator created - Make a copy of the
service_account_cluster.yamlfile for the second namespace (service_account_cluster_n2.yaml, in this example).cp service_account_cluster.yaml service_account_cluster_n2.yaml - Install the
service_account_cluster_n2.yamlYAML file by doing the following:- (Optional): Display the contents of the
service_account_cluster_n2.yamlfile.cat service_account_cluster_n2.yamlThe output is similar to the following:# Copyright (c) 2025, Oracle and/or its affiliates. apiVersion: rbac.authorization.k8s.io/v1 kind: ClusterRole metadata: name: timesten-operator # If running multiple operators on the same cluster: #name: timesten-operator-<NAMESPACE> 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 # If running multiple operators on the same cluster: #name: timesten-operator-<NAMESPACE> subjects: - kind: ServiceAccount name: timesten-operator #namespace: <NAMESPACE> roleRef: kind: ClusterRole name: timesten-operator # If running multiple operators on the same cluster: #name: timesten-operator-<NAMESPACE> apiGroup: rbac.authorization.k8s.io - Use a text editor to modify the
service_account_cluster_n2.yamlfile.Make the following changes:-
Locate
#namespace, remove#, and replace<NAMESPACE>with the name of your namespace (mynamespace2, in this example). -
Locate the three occurrences of
#name, remove#, and replace<NAMESPACE>with the name of your namespace (mynamespace2, in this example).
vi service_account_cluster_n2.yaml # Copyright (c) 2025, Oracle and/or its affiliates. apiVersion: rbac.authorization.k8s.io/v1 kind: ClusterRole metadata: name: timesten-operator # If running multiple operators on the same cluster: name: timesten-operator-mynamespace2 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 # If running multiple operators on the same cluster: name: timesten-operator-mynamespace2 subjects: - kind: ServiceAccount name: timesten-operator namespace: mynamespace2 roleRef: kind: ClusterRole name: timesten-operator # If running multiple operators on the same cluster: name: timesten-operator-mynamespace2 apiGroup: rbac.authorization.k8s.io -
- Save and close the
service_account_cluster_n2.yamlfile. - Install the
service_account_cluster_n2.yamlfile.kubectl create -f service_account_cluster_n2.yamlThe output is similar to the following:clusterrole.rbac.authorization.k8s.io/timesten-operator created clusterrolebinding.rbac.authorization.k8s.io/timesten-operator created
- (Optional): Display the contents of the
- Modify the
operator.yamlfile. In this example, the modifications are the same as theoperator.yamlfile in namespace one. However, these modifications do not need to be the same as the modifications for namespace one. For example, you can use a different container image:- Use a text editor to modify the
operator.yamlfile.Replace the following:
-
image: Replacecontainer-registry.oracle.com/timesten/timesten:latestwith the name of your image. In this example, the name of the image iscontainer-registry.oracle.com/timesten/timesten:22.1.1.34.0. -
imagePullSecrets: Replacesekretwith the name of your image pull secret. In this example, the name of the image pull secret issekret. -
If you are running in a multi-architecture environment, modify the
affinitysection, and specify eitheramd64orarm64. This example assumes you are running in a multi-architecture environment and sets nodes toamd64.
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.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"] -
- Save and close the
operator.yamlfile.
- Use a text editor to modify the
- Install the TimesTen Operator.
kubectl create -f operator.yamlThe output is the following:deployment.apps/timesten-operator created - Verify the TimesTen Operator is running.
kubectl get podsThe output is similar to the following:NAME READY STATUS RESTARTS AGE timesten-operator-577f7fbc6f-h8hj8 1/1 Running 0 61s
mynamespace2) in your Kubernetes cluster at namespace-scope.