3.2. Data Grid サービス Pod の作成


クロスサイトのレプリケーションなどの Data Grid 機能とカスタムキャッシュ定義を使用するには、Data Grid サービス Pod のクラスターを作成します。

手順

  1. spec.service.type: DataGrid を設定し、他のデータグリッドサービスリソースを設定する Infinispan CR を作成します。

    apiVersion: infinispan.org/v1
    kind: Infinispan
    metadata:
      name: example-infinispan
    spec:
      replicas: 2
      service:
        type: DataGrid
    Copy to Clipboard Toggle word wrap
  2. 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"
Copy to Clipboard Toggle word wrap
Expand
フィールド説明

metadata.name

Data Grid クラスターに名前を付けます。

metadata.annotations.infinispan.org/monitoring

クラスターの ServiceMonitor を自動的に作成します。

spec.replicas

クラスター内の Pod の数を指定します。

spec.service.type

タイプ Data Grid サービスを設定します。DataGrid の値は、Data Grid サービス Pod でクラスターを作成します。

spec.service.container

Data Grid サービス Pod のストレージリソースを設定します。

spec.service.sites

クロスサイトのレプリケーションを設定します。

spec.security.endpointSecretName

Data Grid のユーザー認証情報が含まれる認証シークレットを指定します。

spec.security.endpointEncryption

TLS 証明書およびキーストアを指定して、クライアント接続を暗号化します。

spec.container

Data Grid Pod の JVM、CPU、およびメモリーリソースを指定します。

spec.logging

Data Grid のロギングカテゴリーを設定します。

spec.expose

ネットワーク上で Data Grid エンドポイントを公開する方法を制御します。

spec.affinity

Data Grid の可用性を保証する anti-affinity ストラテジーを設定します。

トップに戻る
Red Hat logoGithubredditYoutubeTwitter

詳細情報

試用、購入および販売

コミュニティー

Red Hat ドキュメントについて

Red Hat をお使いのお客様が、信頼できるコンテンツが含まれている製品やサービスを活用することで、イノベーションを行い、目標を達成できるようにします。 最新の更新を見る.

多様性を受け入れるオープンソースの強化

Red Hat では、コード、ドキュメント、Web プロパティーにおける配慮に欠ける用語の置き換えに取り組んでいます。このような変更は、段階的に実施される予定です。詳細情報: Red Hat ブログ.

会社概要

Red Hat は、企業がコアとなるデータセンターからネットワークエッジに至るまで、各種プラットフォームや環境全体で作業を簡素化できるように、強化されたソリューションを提供しています。

Theme

© 2025 Red Hat