3.2. Data Grid サービス Pod の作成
クロスサイトのレプリケーションなどの Data Grid 機能とカスタムキャッシュ定義を使用するには、Data Grid サービス Pod のクラスターを作成します。
手順
spec.service.type: DataGrid
を設定し、他のデータグリッドサービスリソースを設定するInfinispan
CR を作成します。apiVersion: infinispan.org/v1 kind: Infinispan metadata: name: example-infinispan spec: replicas: 2 service: type: DataGrid
-
Infinispan
CR を適用して、クラスターを作成します。
3.2.1. Data Grid サービス CR
このトピックでは、Data Grid サービス Pod の Infinispan
CR について説明します。
apiVersion: infinispan.org/v1 kind: Infinispan metadata: name: example-infinispan annotations: infinispan.org/monitoring: 'true' spec: replicas: 6 service: type: DataGrid container: storage: 2Gi ephemeralStorage: false storageClassName: my-storage-class sites: local: name: azure expose: type: LoadBalancer locations: - name: azure url: openshift://api.azure.host:6443 secretName: azure-token - name: aws clusterName: example-infinispan namespace: rhdg-namespace url: openshift://api.aws.host:6443 secretName: aws-token security: endpointSecretName: endpoint-identities endpointEncryption: type: Secret certSecretName: tls-secret container: extraJvmOpts: "-XX:NativeMemoryTracking=summary" cpu: "1000m" memory: 1Gi logging: categories: org.infinispan: debug org.jgroups: debug org.jgroups.protocols.TCP: error org.jgroups.protocols.relay.RELAY2: error expose: type: LoadBalancer affinity: podAntiAffinity: preferredDuringSchedulingIgnoredDuringExecution: - weight: 100 podAffinityTerm: labelSelector: matchLabels: app: infinispan-pod clusterName: example-infinispan infinispan_cr: example-infinispan topologyKey: "kubernetes.io/hostname"
フィールド | 説明 |
---|---|
| Data Grid クラスターに名前を付けます。 |
|
クラスターの |
| クラスター内の Pod の数を指定します。 |
|
タイプ Data Grid サービスを設定します。 |
| Data Grid サービス Pod のストレージリソースを設定します。 |
| クロスサイトのレプリケーションを設定します。 |
| Data Grid のユーザー認証情報が含まれる認証シークレットを指定します。 |
| TLS 証明書およびキーストアを指定して、クライアント接続を暗号化します。 |
| Data Grid Pod の JVM、CPU、およびメモリーリソースを指定します。 |
| Data Grid のロギングカテゴリーを設定します。 |
| ネットワーク上で Data Grid エンドポイントを公開する方法を制御します。 |
| Data Grid の可用性を保証する anti-affinity ストラテジーを設定します。 |