第4章 クラスターロギングの更新
OpenShift Container Platform クラスターを 4.3 から 4.4 に更新したら、クラスターロギングを 4.3 から 4.4 にアップグレードする必要があります。
4.1. クラスターロギングの更新
OpenShift Container Platform クラスターの更新後に、Elasticsearch Operator および Cluster Logging Operator のサブスクリプションを更新して、クラスターロギングを 4.3 から 4.4 に更新できます。
新規のログ転送機能によって導入された変更により、OpenShift Container Platform 4.3 リリース以降の out_forward のサポートが変更されました。out_forward を設定するために ConfigMap を作成します。Fluentd ConfigMap の secure-forward.conf
セクションに対するすべての更新は削除されます。
更新する前に out_forward プラグインを使用する場合、Fluentd ConfigMap から現在の secure-forward.conf
セクションをコピーし、secure-forward
ConfigMap の作成時にコピーされるデータを使用できます。
前提条件
- クラスターを 4.3 から 4.4 に更新します。
クラスターロギングのステータスが正常であることを確認します。
-
すべての Pod が
Ready
状態にある。 - Elasticsearch クラスターが正常である。
-
すべての Pod が
-
オプションで、
secure-forward
ConfigMap を作成する必要がある場合に Fluentd ConfigMap から現在のsecure-forward.conf
セクションをコピーします。上記の注記を参照してください。
手順
Elasticsearch Operator を更新します。
-
Web コンソールで Operators
Installed Operators をクリックします。 -
openshift-operators-redhat
プロジェクトを選択します。 - Elasticsearch Operatorをクリックします。
-
Subscription
Channel をクリックします。 - Change Subscription Update Channel ウィンドウで 4.4 を選択し、Save をクリックします。
数秒待ってから Operators
Installed Operators をクリックします。 Elasticsearch Operator が 4.4 と表示されます。以下に例を示します。
Elasticsearch Operator 4.4.0-201909201915 provided by Red Hat, Inc
-
Web コンソールで Operators
Cluster Logging Operator を更新します。
-
Web コンソールで Operators
Installed Operators をクリックします。 -
openshift-logging
プロジェクトを選択します。 - Cluster Logging Operatorをクリックします。
-
Subscription
Channel をクリックします。 - Change Subscription Update Channel ウィンドウで 4.4 を選択し、Save をクリックします。
数秒待ってから Operators
Installed Operators をクリックします。 Cluster Logging Operator は 4.4 として表示されます。以下に例を示します。
Cluster Logging 4.4.0-201909201915 provided by Red Hat, Inc
-
Web コンソールで Operators
ロギングコンポーネントを確認します。
Elasticsearch Pod が 4.4 イメージを使用していることを確認します。
$ oc get pod -o yaml -n openshift-logging --selector component=elasticsearch |grep 'image:'
image: registry.redhat.io/openshift4/ose-logging-elasticsearch5@sha256:4e081ff048c3a56113bc672af5dfb8d29ea2ddca1fd79a3332a4446a461944f5 image: registry.redhat.io/openshift4/ose-oauth-proxy@sha256:5fe478210770b21c1eb26c1570bcbda40bc5a79011580ff5ebd4c701a5b04eb2 image: registry.redhat.io/openshift4/ose-logging-elasticsearch5@sha256:4e081ff048c3a56113bc672af5dfb8d29ea2ddca1fd79a3332a4446a461944f5 image: registry.redhat.io/openshift4/ose-oauth-proxy@sha256:5fe478210770b21c1eb26c1570bcbda40bc5a79011580ff5ebd4c701a5b04eb2 image: registry.redhat.io/openshift4/ose-logging-elasticsearch5@sha256:4e081ff048c3a56113bc672af5dfb8d29ea2ddca1fd79a3332a4446a461944f5 image: registry.redhat.io/openshift4/ose-oauth-proxy@sha256:5fe478210770b21c1eb26c1570bcbda40bc5a79011580ff5ebd4c701a5b04eb2 image: registry.redhat.io/openshift4/ose-logging-elasticsearch5@sha256:4e081ff048c3a56113bc672af5dfb8d29ea2ddca1fd79a3332a4446a461944f5 image: registry.redhat.io/openshift4/ose-oauth-proxy@sha256:5fe478210770b21c1eb26c1570bcbda40bc5a79011580ff5ebd4c701a5b04eb2 image: registry.redhat.io/openshift4/ose-logging-elasticsearch5@sha256:4e081ff048c3a56113bc672af5dfb8d29ea2ddca1fd79a3332a4446a461944f5 image: registry.redhat.io/openshift4/ose-oauth-proxy@sha256:5fe478210770b21c1eb26c1570bcbda40bc5a79011580ff5ebd4c701a5b04eb2 image: registry.redhat.io/openshift4/ose-logging-elasticsearch5@sha256:4e081ff048c3a56113bc672af5dfb8d29ea2ddca1fd79a3332a4446a461944f5 image: registry.redhat.io/openshift4/ose-oauth-proxy@sha256:5fe478210770b21c1eb26c1570bcbda40bc5a79011580ff5ebd4c701a5b04eb2
すべての 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
Elasticsearch クラスターが正常であることを確認します。
oc exec -n openshift-logging -c elasticsearch elasticsearch-cdm-1pbrl44l-1-55b7546f4c-mshhk -- es_cluster_health { "cluster_name" : "elasticsearch", "status" : "green", ....
ロギングコレクター Pod が 4.4 イメージを使用していることを確認します。
$ oc get pod -n openshift-logging --selector logging-infra=fluentd -o yaml |grep 'image:'
image: registry.redhat.io/openshift4/ose-logging-fluentd@sha256:20f92b37685bc1003bb490002f7d8a1abee2dd2d157e8532afa3830ce8da3483 image: registry.redhat.io/openshift4/ose-logging-fluentd@sha256:20f92b37685bc1003bb490002f7d8a1abee2dd2d157e8532afa3830ce8da3483 image: registry.redhat.io/openshift4/ose-logging-fluentd@sha256:20f92b37685bc1003bb490002f7d8a1abee2dd2d157e8532afa3830ce8da3483 image: registry.redhat.io/openshift4/ose-logging-fluentd@sha256:20f92b37685bc1003bb490002f7d8a1abee2dd2d157e8532afa3830ce8da3483 image: registry.redhat.io/openshift4/ose-logging-fluentd@sha256:20f92b37685bc1003bb490002f7d8a1abee2dd2d157e8532afa3830ce8da3483 image: registry.redhat.io/openshift4/ose-logging-fluentd@sha256:20f92b37685bc1003bb490002f7d8a1abee2dd2d157e8532afa3830ce8da3483 image: registry.redhat.io/openshift4/ose-logging-fluentd@sha256:20f92b37685bc1003bb490002f7d8a1abee2dd2d157e8532afa3830ce8da3483 image: registry.redhat.io/openshift4/ose-logging-fluentd@sha256:20f92b37685bc1003bb490002f7d8a1abee2dd2d157e8532afa3830ce8da3483 image: registry.redhat.io/openshift4/ose-logging-fluentd@sha256:20f92b37685bc1003bb490002f7d8a1abee2dd2d157e8532afa3830ce8da3483 image: registry.redhat.io/openshift4/ose-logging-fluentd@sha256:20f92b37685bc1003bb490002f7d8a1abee2dd2d157e8532afa3830ce8da3483 image: registry.redhat.io/openshift4/ose-logging-fluentd@sha256:20f92b37685bc1003bb490002f7d8a1abee2dd2d157e8532afa3830ce8da3483 image: registry.redhat.io/openshift4/ose-logging-fluentd@sha256:20f92b37685bc1003bb490002f7d8a1abee2dd2d157e8532afa3830ce8da3483
Kibana Pod が 4.4 イメージを使用していることを確認します。
$ oc get pod -n openshift-logging --selector logging-infra=kibana -o yaml |grep 'image:'
image: registry.redhat.io/openshift4/ose-logging-kibana5@sha256:3d657e3b90fae604a8351b1923250f93c04529b36e6ada0aba7c0a038ffef56e image: registry.redhat.io/openshift4/ose-oauth-proxy@sha256:5fe478210770b21c1eb26c1570bcbda40bc5a79011580ff5ebd4c701a5b04eb2 image: registry.redhat.io/openshift4/ose-logging-kibana5@sha256:3d657e3b90fae604a8351b1923250f93c04529b36e6ada0aba7c0a038ffef56e image: registry.redhat.io/openshift4/ose-oauth-proxy@sha256:5fe478210770b21c1eb26c1570bcbda40bc5a79011580ff5ebd4c701a5b04eb2
Curator CronJob が 4.4 イメージを使用していることを確認します。
$ oc get CronJob curator -n openshift-logging -o yaml |grep 'image:'
image: registry.redhat.io/openshift4/ose-logging-curator5@sha256:330c3499e790d0e184414125a4843cd48849c601eb9f19ff82f30794c858b0bc