第4章 クラスターロギングの更新

OpenShift Container Platform クラスターを 4.2 から 4.3 に更新したら、クラスターロギングを 4.2 から 4.3 にアップグレードする必要があります。

4.1. クラスターロギングの更新

OpenShift Container Platform クラスターの更新後に、Elasticsearch Operator および Cluster Logging Operator のサブスクリプションを更新して、クラスターロギングを 4.2 から 4.3 に更新できます。

重要

新規のログ転送機能によって導入された変更により、OpenShift Container Platform 4.3 リリース以降の out_forward のサポートが変更されました。OpenShift Container Platform 4.3 では、ConfigMap を作成して out_forward を設定します。Fluentd ConfigMap の secure-forward.conf セクションに対するすべての更新は削除されます。

更新する前に out_forward プラグインを使用する場合、Fluentd ConfigMap から現在の secure-forward.conf セクションをコピーし、secure-forward ConfigMap の作成時にコピーされるデータを使用できます。

前提条件

  • クラスターを 4.2 から 4.3 に更新します。
  • クラスターロギングのステータスが正常であることを確認します。

    • すべての Pod が Ready 状態にある。
    • Elasticsearch クラスターが正常である。
  • オプションで、secure-forward ConfigMap を作成する必要がある場合に Fluentd ConfigMap から現在の secure-forward.conf セクションをコピーします。上記の注記を参照してください。

手順

  1. Elasticsearch Operator を更新します。

    1. Web コンソールで OperatorsInstalled Operators をクリックします。
    2. openshift-logging プロジェクトを選択します。
    3. Elasticsearch Operatorをクリックします。
    4. SubscriptionChannel をクリックします。
    5. Change Subscription Update Channel ウィンドウで 4.3 を選択し、Save をクリックします。
    6. 数秒待ってから OperatorsInstalled Operators をクリックします。

      Elasticsearch Operator が 4.3 と表示されます。以下は例になります。

      Elasticsearch Operator
      4.3.0-201909201915 provided
      by Red Hat, Inc
  2. Cluster Logging Operator を更新します。

    1. Web コンソールで OperatorsInstalled Operators をクリックします。
    2. openshift-logging プロジェクトを選択します。
    3. Cluster Logging Operatorをクリックします。
    4. SubscriptionChannel をクリックします。
    5. Change Subscription Update Channel ウィンドウで 4.3 を選択し、Save をクリックします。
    6. 数秒待ってから OperatorsInstalled Operators をクリックします。

      Cluster Logging Operator は 4.3 として表示されます。以下は例になります。

      Cluster Logging
      4.3.0-201909201915 provided
      by Red Hat, Inc
  3. ロギングコンポーネントを確認します。

    1. Elasticsearch Pod が 4.3 イメージを使用していることを確認します。

      $ oc get pod -o yaml -n openshift-logging --selector component=elasticsearch |grep 'image:'
      
      image: registry.redhat.io/openshift4/ose-logging-elasticsearch5:v4.3.0-202001081344
      image: registry.redhat.io/openshift4/ose-oauth-proxy:v4.3.0-202001081344
      image: registry.redhat.io/openshift4/ose-logging-elasticsearch5:v4.3.0-202001081344
      image: registry.redhat.io/openshift4/ose-oauth-proxy:v4.3.0-202001081344
      image: registry.redhat.io/openshift4/ose-logging-elasticsearch5:v4.3.0-202001081344
      image: registry.redhat.io/openshift4/ose-oauth-proxy:v4.3.0-202001081344
      image: registry.redhat.io/openshift4/ose-logging-elasticsearch5:v4.3.0-202001081344
      image: registry.redhat.io/openshift4/ose-oauth-proxy:v4.3.0-202001081344
      image: registry.redhat.io/openshift4/ose-logging-elasticsearch5:v4.3.0-202001081344
      image: registry.redhat.io/openshift4/ose-oauth-proxy:v4.3.0-202001081344
      image: registry.redhat.io/openshift4/ose-logging-elasticsearch5:v4.3.0-202001081344
      image: registry.redhat.io/openshift4/ose-oauth-proxy:v4.3.0-202001081344
    2. すべての Elasticsearch Pod が Ready ステータスであることを確認します。

      $ oc get pod -n openshift-logging --selector component=elasticsearch
      
      NAME                                            READY   STATUS    RESTARTS   AGE
      elasticsearch-cdm-1pbrl44l-1-55b7546f4c-mshhk   2/2     Running   0          31m
      elasticsearch-cdm-1pbrl44l-2-5c6d87589f-gx5hk   2/2     Running   0          30m
      elasticsearch-cdm-1pbrl44l-3-88df5d47-m45jc     2/2     Running   0          29m
    3. Elasticsearch クラスターが正常であることを確認します。

      oc exec -n openshift-logging -c elasticsearch elasticsearch-cdm-1pbrl44l-1-55b7546f4c-mshhk -- es_cluster_health
      
      {
        "cluster_name" : "elasticsearch",
        "status" : "green",
      
      ....
    4. ロギングコレクター Pod が 4.3 イメージを使用していることを確認します。

      $ oc get pod -n openshift-logging --selector logging-infra=fluentd -o yaml |grep 'image:'
      
      image: registry.redhat.io/openshift4/ose-logging-fluentd:v4.3.0-202001081344
      image: registry.redhat.io/openshift4/ose-logging-fluentd:v4.3.0-202001081344
      image: registry.redhat.io/openshift4/ose-logging-fluentd:v4.3.0-202001081344
      image: registry.redhat.io/openshift4/ose-logging-fluentd:v4.3.0-202001081344
      image: registry.redhat.io/openshift4/ose-logging-fluentd:v4.3.0-202001081344
      image: registry.redhat.io/openshift4/ose-logging-fluentd:v4.3.0-202001081344
      image: registry.redhat.io/openshift4/ose-logging-fluentd:v4.3.0-202001081344
      image: registry.redhat.io/openshift4/ose-logging-fluentd:v4.3.0-202001081344
      image: registry.redhat.io/openshift4/ose-logging-fluentd:v4.3.0-202001081344
      image: registry.redhat.io/openshift4/ose-logging-fluentd:v4.3.0-202001081344
      image: registry.redhat.io/openshift4/ose-logging-fluentd:v4.3.0-202001081344
      image: registry.redhat.io/openshift4/ose-logging-fluentd:v4.3.0-202001081344
    5. Kibana Pod が 4.3 イメージを使用していることを確認します。

      $ oc get pod -n openshift-logging --selector logging-infra=kibana -o yaml |grep 'image:'
      
      image: registry.redhat.io/openshift4/ose-logging-kibana5:v4.3.0-202001081344
      image: registry.redhat.io/openshift4/ose-oauth-proxy:v4.3.0-202001081344
      image: registry.redhat.io/openshift4/ose-logging-kibana5:v4.3.0-202001081344
      image: registry.redhat.io/openshift4/ose-oauth-proxy:v4.3.0-202001081344
    6. Curator CronJob が 4.3 イメージを使用していることを確認します。

      $ $ oc get CronJob curator -n openshift-logging -o yaml |grep 'image:'
      
      image: registry.redhat.io/openshift4/ose-logging-curator5:v4.3.0-202001081344