- 概要
- 要件
- デプロイ テンプレート
- 手動: インストールを準備する
- 手動: インストールを準備する
- 手順 2: オフライン インストール用に OCI 準拠レジストリを設定する
- 手順 3: 外部 ObjectStore を構成する
- 手順 4: High Availability Add-on を構成する
- 手順 5: SQL データベースを構成する
- 手順 7: DNS を構成する
- 手順 8: ディスクを構成する
- 手順 9: カーネルと OS レベルの設定を構成する
- 手順 10: ノード ポートを構成する
- 手順 11: その他の設定を適用する
- 手順 12: 必要な RPM パッケージを検証してインストールする
- Cluster_config.json のサンプル
- 全般的な構成
- プロファイル構成
- 証明書の設定
- データベースの構成
- 外部 ObjectStore の構成
- 署名済み URL の構成
- ArgoCD の構成
- Kerberos 認証の構成
- 外部の OCI 準拠レジストリの設定
- Disaster Recovery - アクティブ/パッシブおよびアクティブ/アクティブの構成
- High Availability Add-on の構成
- Orchestrator 固有の設定
- Insights 固有の構成
- Process Mining 固有の構成
- Document Understanding 固有の構成
- Automation Suite ロボット固有の構成
- AI Center 固有の構成
- 監視の構成
- 任意: プロキシ サーバーを構成する
- 任意: マルチノードの HA 対応の運用クラスターにおけるゾーン障害に対する復元設定を有効化する
- 任意: カスタムの Resolv.con を渡す
- 任意: フォールト トレランスを向上させる
- GPU がサポートされた専用のエージェント ノードを追加する
- Automation Suite ロボット専用のエージェント ノードを追加する
- 手順 15: オフライン インストール用に一時的な Docker レジストリを設定する
- 手順 16: インストールの前提条件を検証する
- 手動: インストールを実行する
- インストール後
- クラスターの管理
- 監視とアラート機能
- 移行とアップグレード
- 製品固有の設定
- ベスト プラクティスとメンテナンス
- トラブルシューティング
- インストール時にサービスをトラブルシューティングする方法
- クラスターをアンインストールする方法
- オフライン成果物をクリーンアップしてディスク領域を改善する方法
- Redis データをクリアする方法
- Istio ログを有効化する方法
- ログを手動でクリーンアップする方法
- sf-logs バケットに保存されている古いログをクリーンアップする方法
- AI Center のストリーミング ログを無効化する方法
- 失敗した Automation Suite インストールをデバッグする方法
- アップグレード後に古いインストーラーからイメージを削除する方法
- TX チェックサム オフロードを無効化する方法
- ArgoCD のログ レベルを手動で Info に設定する方法
- AI Center のストレージを拡張する方法
- 外部レジストリーのエンコードされたpull_secret_valueを生成する方法
- TLS 1.2 で弱い暗号に対処する方法
- TLSのバージョンを確認する方法
- 証明書の操作方法
- Ceph のバックアップとデータの復元をスケジュールする方法
- クラスター内の ObjectStore (Ceph) を使用して DU の使用状況データを収集する方法
- エアギャップ環境に RKE2 SELinux をインストールする方法
- NFS サーバー上の古い差分バックアップをクリーンアップする方法
- バンドルのダウンロード中のエラー
- バイナリがないため、オフライン インストールが失敗する
- オフライン インストールでの証明書の問題
- SQL 接続文字列の検証エラー
- Azure ディスクが SSD としてマークされない
- 証明書の更新後のエラー
- ウイルス対策が原因でインストールの問題が発生する
- OS のアップグレード後に Automation Suite が動作しない
- Automation Suite で backlog_wait_time を 0 に設定する必要がある
- RHEL 8.9 でレジストリの一時インストールが失敗する
- オフライン インストール中に uipath 名前空間のデプロイで頻繁に発生する再起動の問題
- DNS 設定が CoreDNS によって受け入れられない
- Ceph の異常によりアップグレードが失敗する
- 領域の問題のために rke2 が開始しない
- Orchestrator データベース内のクラシック オブジェクトが原因でアップグレードが失敗する
- Ceph クラスターがサイドバイサイド アップグレード後に機能低下ステートで検出される
- Apps のサービス アップグレードの失敗
- インプレース アップグレードのタイムアウト
- オフライン環境でアップグレードが失敗する
- アップグレード後に snapshot-controller-crds ポッドが CrashLoopBackOff ステートになる
- Insights の PVC サイズが上書きされたためにアップグレードが失敗する
- 管理ポータルのタイムアウト期間を設定する
- 移行後に認証が機能しない
- Kinit: Cannot find KDC for realm <AD Domain> while getting initial credentials
- kinit: Keytab contains no suitable keys for *** while getting initial credentials
- 無効なステータス コードが原因で GSSAPI 操作が失敗した
- Alarm received for failed kerberos-tgt-update job
- SSPI Provider: Server not found in Kerberos database
- アカウントが無効なため AD ユーザーのログインに失敗した
- ArgoCD へのログインに失敗した
- 基になるディレクトリ接続を更新する
- Process Mining で高可用性を実行する
- Kerberos を使用してログインすると、Process Mining を取り込むことができなかった
- pyodbc 形式の接続文字列を使用して AutomationSuite_ProcessMining_Warehouse データベースに接続できない
- Airflow のインストールが「sqlalchemy.exc.ArgumentError: Could not parse rfc1738 URL from string ''」で失敗する
- SQL Server ポート 1433 を使用する IP テーブル ルールを追加する方法
- CData Sync を実行しているサーバーの Automation Suite の証明書が信頼されない
- 診断ツールを実行する
- Automation Suite サポート バンドルを使用する
- ログを確認する
- 要約されたテレメトリを確認する

Linux の Automation Suite のインストール ガイド
インストール プロセスによって、ユーザーに代わって自己署名証明書が生成されます。これらの証明書は FIPS に対応しており、90 日で有効期限が切れるので、インストールが完了したら速やかに、信頼された証明機関 (CA) によって署名された証明書に置き換える必要があります。証明書を更新しないと、90 日でインストールが動作を停止します。
Automation Suite を FIPS が有効化されたホストにインストールした後で証明書を更新する場合は、その証明書が FIPS に対応していることを確認してください。
インストール バンドルでは、インストール後に証明書を更新できるクラスター管理ツールを提供しています。このツールにアクセスするには、インストーラー バンドルの保存場所に移動します。
cd /opt/UiPathAutomationSuite/cd /opt/UiPathAutomationSuite/CSR および秘密キーを生成するには、次のコマンドを実行します。
# copy the machine openssl configuration locally
cp /etc/pki/tls/openssl.cnf ./openssl.tmp.cnf
# Replace the [AUTOMATION_SUITE_FQDN] value. For example, "automationsuite.corp.com"
AS_FQDN=[AUTOMATION_SUITE_FQDN]
cat >> ./openssl.tmp.cnf <<EOF
[SAN]
subjectAltName=DNS:$AS_FQDN,DNS:alm.$AS_FQDN,DNS:monitoring.$AS_FQDN,DNS:registry.$AS_FQDN,DNS:objectstore.$AS_FQDN,DNS:insights.$AS_FQDN,DNS:apps.$AS_FQDN
EOF
# create the certificate request
openssl req -new -sha256 -newkey rsa:2048 -nodes -keyout server.key -subj "/C=xx/ST=xx/O=xx/OU=xx/CN=$AS_FQDN" -reqexts SAN -config openssl.tmp.cnf -out ${AS_FQDN}.csr# copy the machine openssl configuration locally
cp /etc/pki/tls/openssl.cnf ./openssl.tmp.cnf
# Replace the [AUTOMATION_SUITE_FQDN] value. For example, "automationsuite.corp.com"
AS_FQDN=[AUTOMATION_SUITE_FQDN]
cat >> ./openssl.tmp.cnf <<EOF
[SAN]
subjectAltName=DNS:$AS_FQDN,DNS:alm.$AS_FQDN,DNS:monitoring.$AS_FQDN,DNS:registry.$AS_FQDN,DNS:objectstore.$AS_FQDN,DNS:insights.$AS_FQDN,DNS:apps.$AS_FQDN
EOF
# create the certificate request
openssl req -new -sha256 -newkey rsa:2048 -nodes -keyout server.key -subj "/C=xx/ST=xx/O=xx/OU=xx/CN=$AS_FQDN" -reqexts SAN -config openssl.tmp.cnf -out ${AS_FQDN}.csrIT チームが、取得した値を使用して署名証明書を生成します。生成された秘密キーはローカルのままです。
サーバー証明書の詳細情報を表示するには、次のコマンドを実行します。
./bin/uipathctl config tls-certificates --help./bin/uipathctl config tls-certificates --help出力:
************************************************************************************
Manage tls certificates
Usage:
uipathctl config tls-certificates [flags]
uipathctl config tls-certificates [command]
Available Commands:
get Get the current tls certificates
update Update tls certificates
Flags:
-h, --help help for tls-certificates
Global Flags:
--context string name of the kubeconfig context to use
-f, --force override all user prompts to true
--kubeconfig string kubectl configuration file (default: ~/.kube/config)
--log-format string log format. one of [text,json] (default "text")
--log-level string set log level. one of [trace,debug,info,error] (default "info")
-q, --quiet disable progress indicators (emoji/formatted status messages)
--timeout duration timeout of the command (default: 90 minutes) (default 1h30m0s)
--versions string optional path to versions file
Use "uipathctl config tls-certificates [command] --help" for more information about a command.
************************************************************************************************************************************************************************
Manage tls certificates
Usage:
uipathctl config tls-certificates [flags]
uipathctl config tls-certificates [command]
Available Commands:
get Get the current tls certificates
update Update tls certificates
Flags:
-h, --help help for tls-certificates
Global Flags:
--context string name of the kubeconfig context to use
-f, --force override all user prompts to true
--kubeconfig string kubectl configuration file (default: ~/.kube/config)
--log-format string log format. one of [text,json] (default "text")
--log-level string set log level. one of [trace,debug,info,error] (default "info")
-q, --quiet disable progress indicators (emoji/formatted status messages)
--timeout duration timeout of the command (default: 90 minutes) (default 1h30m0s)
--versions string optional path to versions file
Use "uipathctl config tls-certificates [command] --help" for more information about a command.
************************************************************************************uipathctl config tls-certificates コマンドを使用して実行できる操作について説明します。
サーバー証明書を更新する
オンライン インストール: サーバー証明書の確認方法
istio-system 名前空間内に istio-ingressgateway-certs という名前で確認できます。
証明書ファイルについては、以下のリストをご覧ください。
- サーバー TLS 証明書は
tls.crtとして保存されます。 - サーバー TLS 秘密キーは
tls.keyとして保存されます。 - CA バンドルは
ca.crtとして保存されます。
次のコマンドを使用して、シークレットを確認できます。
kubectl -n istio-system get secrets istio-ingressgateway-certs -o yamlkubectl -n istio-system get secrets istio-ingressgateway-certs -o yaml証明書は UiPath 名前空間にも保存されます。これは、受信呼び出しを信頼するために証明書情報を必要とするすべての UiPath® 製品に適用されます。詳細については、「証明書に関連するコンテナー アーキテクチャを理解する」をご覧ください。
オフライン インストール: サーバー証明書の確認方法
rootCA.crt と tls.crt を使用する場所が他に 2 つあります。ArgoCD と Docker レジストリです。証明書は、Docker と ArgoCD の両方の名前空間に保存されます。
次のコマンドを使用して、シークレットを確認できます。
# For docker registry
kubectl -n docker-registry get secrets docker-registry-tls -o yaml
# For Argocd
argocd login alm.cluster_fqnd --username argocd_username --password argocd_password
argocd cert list --cert-type https# For docker registry
kubectl -n docker-registry get secrets docker-registry-tls -o yaml
# For Argocd
argocd login alm.cluster_fqnd --username argocd_username --password argocd_password
argocd cert list --cert-type httpsサーバー証明書の更新方法
証明書キーを復号するには、次のコマンドを実行します。
# replace /path/to/encrypted/cert/key to absolute file path of key
# replace /path/to/decrypt/cert/key to store decrypt key
# Once prompted, please entry the passphrase or password to decrypt the key
openssl rsa -in /path/to/encrypted/cert/key -out /path/to/decrypt/cert/key# replace /path/to/encrypted/cert/key to absolute file path of key
# replace /path/to/decrypt/cert/key to store decrypt key
# Once prompted, please entry the passphrase or password to decrypt the key
openssl rsa -in /path/to/encrypted/cert/key -out /path/to/decrypt/cert/keyuipathctl を実行して証明書を更新します。3 つの証明書ファイルのそれぞれに対するパスが必要です。 証明書ファイルは、すべて PEM 形式である必要があります。
- 証明機関バンドル - このバンドルには TLS サーバー証明書への署名に使用するチェーン証明書のみを含める必要があります。チェーンの制限は最大 9 個の証明書です。
-
サーバー証明書 - 公開サーバー証明書です。
注:次の例に示すように、server.crtファイルにはチェーン全体が含まれている必要があります。-----server cert----- -----root ca chain----------server cert----- -----root ca chain----- -
秘密キー - サーバー証明書の秘密キーです。
./bin/uipathctl config tls-certificates update --cert server.crt --cacert ca.crt --key server.key./bin/uipathctl config tls-certificates update --cert server.crt --cacert ca.crt --key server.key
/directory/path/to/store/certificateの場所には、次のファイルが保存されます。
TLS 証明書にアクセスする
証明書ファイルを出力するには、証明書が保存されているディレクトリを指定して、次のコマンドを実行します。
./bin/uipathctl config tls-certificates get --show-details./bin/uipathctl config tls-certificates get --show-detailsCA 証明書をホスト信頼ストアに追加する
生成された証明書が信頼できることを確認するのはユーザーの責任です。
証明書をホスト仮想マシンの信頼ストアに追加するには、クラスター内のすべてのノードで次のコマンドを実行します。
# 1. Copy the certificate file to the /usr/share/pki/ca-trust-source/anchors/ or the /etc/pki/ca-trust/source/anchors/ directory
cp /path/to/the/ca-cert /usr/share/pki/ca-trust-source/anchors/
# 2. Update the trust store configuration
update-ca-trust# 1. Copy the certificate file to the /usr/share/pki/ca-trust-source/anchors/ or the /etc/pki/ca-trust/source/anchors/ directory
cp /path/to/the/ca-cert /usr/share/pki/ca-trust-source/anchors/
# 2. Update the trust store configuration
update-ca-trust追加の CA 証明書の詳細情報を表示するには、次のコマンドを実行します。
./bin/uipathctl config additional-ca-certificates --help./bin/uipathctl config additional-ca-certificates --help出力:
***************************************************************************************
Manage additional ca certificates
Usage:
uipathctl config additional-ca-certificates [flags]
uipathctl config additional-ca-certificates [command]
Available Commands:
get Get the current additional ca certificates
update Update additional ca certificates
Flags:
-h, --help help for additional-ca-certificates
Global Flags:
--context string name of the kubeconfig context to use
-f, --force override all user prompts to true
--kubeconfig string kubectl configuration file (default: ~/.kube/config)
--log-format string log format. one of [text,json] (default "text")
--log-level string set log level. one of [trace,debug,info,error] (default "info")
-q, --quiet suppress all output except for errors and warnings
--timeout duration timeout of the command (default: 90 minutes) (default 1h30m0s)
--versions string optional path to versions file
Use "uipathctl config additional-ca-certificates [command] --help" for more information about a command.
******************************************************************************************************************************************************************************
Manage additional ca certificates
Usage:
uipathctl config additional-ca-certificates [flags]
uipathctl config additional-ca-certificates [command]
Available Commands:
get Get the current additional ca certificates
update Update additional ca certificates
Flags:
-h, --help help for additional-ca-certificates
Global Flags:
--context string name of the kubeconfig context to use
-f, --force override all user prompts to true
--kubeconfig string kubectl configuration file (default: ~/.kube/config)
--log-format string log format. one of [text,json] (default "text")
--log-level string set log level. one of [trace,debug,info,error] (default "info")
-q, --quiet suppress all output except for errors and warnings
--timeout duration timeout of the command (default: 90 minutes) (default 1h30m0s)
--versions string optional path to versions file
Use "uipathctl config additional-ca-certificates [command] --help" for more information about a command.
***************************************************************************************uipathctl config additional-ca-certificates コマンドを使用して実行できる操作について説明します。
CA 証明書を更新する
CA 証明書を更新するには、次の手順を実行します。
cluster_config.jsonファイルを、additional_ca_certsを含むファイルを指すように更新します。このパラメーターについて詳しくは、「 証明書の設定」をご覧ください。- マニフェストを適用します。
./bin/uipathctl manifest apply cluster_config.json --versions versions.json./bin/uipathctl manifest apply cluster_config.json --versions versions.json大事な: このコマンドは、次のようなエラーで失敗する可能性があります。障害に関係なく、手順 3 に進み、デプロイを再起動して環境を安定させます。Error: [failed to wait for application argocd/<app-name1>: timed out waiting for the condition, failed to wait for application argocd/<app-name2>: timed out waiting for the condition]]Error: [failed to wait for application argocd/<app-name1>: timed out waiting for the condition, failed to wait for application argocd/<app-name2>: timed out waiting for the condition]] uipath名前空間のすべてのデプロイとステートフル セットを手動で再起動します。kubectl rollout restart deployment -n <uipath> kubectl rollout restart sts -n <uipath>kubectl rollout restart deployment -n <uipath> kubectl rollout restart sts -n <uipath>
get コマンドを使用して、[additional_ca_certs] フィールドで指定する必要がある CA 証明書.pem ファイルに追加する必要があります。
.pem 形式である必要があり、複数の証明書を含めることができます。
CA 証明書にアクセスする
設定済みの CA 証明書をダウンロードするには、次のコマンドを実行します。
./bin/uipathctl config additional-ca-certificates get ./bin/uipathctl config additional-ca-certificates getCA 証明書をホスト信頼ストアに追加する
生成された証明書が信頼できることを確認するのはユーザーの責任です。
証明書をホスト仮想マシンの信頼ストアに追加するには、クラスター内のすべてのノードで次のコマンドを実行します。
# 1. Copy the certificate file to the /usr/share/pki/ca-trust-source/anchors/ or the /etc/pki/ca-trust/source/anchors/ directory
cp /path/to/the/ca-cert /usr/share/pki/ca-trust-source/anchors/
# 2. Update the trust store configuration
update-ca-trust# 1. Copy the certificate file to the /usr/share/pki/ca-trust-source/anchors/ or the /etc/pki/ca-trust/source/anchors/ directory
cp /path/to/the/ca-cert /usr/share/pki/ca-trust-source/anchors/
# 2. Update the trust store configuration
update-ca-trustWindows 環境の場合は、この ガイド を参照して信頼されたルート証明書をインストールしてください。
Automation Suite では、ID トークン署名証明書のローテーションを管理する方法として、自動と手動の 2 つの方法が用意されています。
追加の ID トークン署名証明書の詳細情報を表示するには、次のコマンドを実行します。
./bin/uipathctl config token-signing-certificates --help./bin/uipathctl config token-signing-certificates --help出力:
************************************************************************************
Manage token signing certificates
Usage:
uipathctl config token-signing-certificates [flags]
uipathctl config token-signing-certificates [command]
Available Commands:
automatic-key-management Manage key management
get Get the current token signing certificate
rotate Rotate token signing certificates
update Update future token signing certificate
Flags:
-h, --help help for token-signing-certificates
Global Flags:
--context string name of the kubeconfig context to use
-f, --force override all user prompts to true
--kubeconfig string kubectl configuration file (default: ~/.kube/config)
--log-format string log format. one of [text,json] (default "text")
--log-level string set log level. one of [trace,debug,info,error] (default "info")
-q, --quiet suppress all output except for errors and warnings
--timeout duration timeout of the command (default: 90 minutes) (default 1h30m0s)
--versions string optional path to versions file
Use "uipathctl config token-signing-certificates [command] --help" for more information about a command.
************************************************************************************************************************************************************************
Manage token signing certificates
Usage:
uipathctl config token-signing-certificates [flags]
uipathctl config token-signing-certificates [command]
Available Commands:
automatic-key-management Manage key management
get Get the current token signing certificate
rotate Rotate token signing certificates
update Update future token signing certificate
Flags:
-h, --help help for token-signing-certificates
Global Flags:
--context string name of the kubeconfig context to use
-f, --force override all user prompts to true
--kubeconfig string kubectl configuration file (default: ~/.kube/config)
--log-format string log format. one of [text,json] (default "text")
--log-level string set log level. one of [trace,debug,info,error] (default "info")
-q, --quiet suppress all output except for errors and warnings
--timeout duration timeout of the command (default: 90 minutes) (default 1h30m0s)
--versions string optional path to versions file
Use "uipathctl config token-signing-certificates [command] --help" for more information about a command.
************************************************************************************証明書への署名には、キーの最大長 4096 ビットを使用できます。 ベスト プラクティスとして、少なくとも 512 ビット (64 バイト) のキー長を使用することを強くお勧めします。
uipathctl config token-signing-certificates コマンドを使用して実行できる操作について詳しく説明します。
証明書の自動ローテーション
証明書の自動ローテーションとは、署名キーのライフサイクルを Automation Suite が管理することを意味します。 これには、90 日ごとのキーのローテーション、ローテーションの 14 日前に新しいキーのアナウンス、ローテーション後の 14 日間古いキーを保持し、14 日間の期間が終了したら削除することが含まれます。
古いバージョンから 2.2510 にアップグレードする場合、証明書の自動ローテーションは既定で無効化されています。キーの自動管理を有効化するには、次のコマンドを使用します。
./bin/uipathctl config token-signing-certificates automatic-key-management enable./bin/uipathctl config token-signing-certificates automatic-key-management enable証明書の自動ローテーションを有効化すると、最大 1 時間のダウンタイムが発生する可能性があります。
Automation Suite のクリーン インストールの場合、証明書の自動ローテーションは既定で有効化されています。 自動キー管理を無効にするには、次のコマンドを使用します。
./bin/uipathctl config token-signing-certificates automatic-key-management disable./bin/uipathctl config token-signing-certificates automatic-key-management disable自動管理機能が無効になっている場合は、署名証明書を手動で更新およびローテーションする必要があります。 手動のキー管理について詳しくは、証明書の手動更新とローテーションに関するドキュメントをご覧ください。
証明書の手動更新
新しい証明書をアップロードしてトークンに署名するには、次のコマンドを実行します。
次のコマンドでは、既存のトークン署名証明書は置換されません。
.pem 形式であることを確認します。
server.crt ファイルにはチェーン全体が含まれている必要があります。
-----server cert-----
-----root ca chain----------server cert-----
-----root ca chain-----./bin/uipathctl config token-signing-certificates update --cert server.crt --key server.key./bin/uipathctl config token-signing-certificates update --cert server.crt --key server.key証明書を手動でローテーションする
古い証明書をローテーションしたり、新しい証明書に置換したりするには、次のコマンドを実行します。
./bin/uipathctl config token-signing-certificates rotate./bin/uipathctl config token-signing-certificates rotate証明書の更新とローテーションの間には、約 24 - 48 時間のリード タイムが必要です。
このリード タイムは、キャッシュされている、古い証明書によって署名されたトークンの認証を引き続きサポートするために必要となります。
キャッシュ トークンの有効期限の満了を待たずに証明書をローテーションすると、ダウンタイムが発生する場合があります。さらに、すべてのロボットの再起動が必要になる可能性もあります。
証明書の緊急ローテーション
証明書の緊急更新を実行するには、次の手順に従います。
証明書にアクセスする
現在のトークン署名証明書をダウンロードするには、次のコマンドを実行します。
./bin/uipathctl config token-signing-certificates get --show-details ./bin/uipathctl config token-signing-certificates get --show-details 既定では、RKE2 証明書は 12 か月で有効期限が切れます。有効期限の 90 日前に RKE2 を再起動すると、証明書がローテーションされます。
詳細については、「RKE2 - Advanced Options - Certificate rotation」をご覧ください。
RKE2 証明書の有効期限を確認する
if [[ -d "/var/lib/rancher/rke2/server/tls" ]]; then
dir="/var/lib/rancher/rke2/server/tls"
elif [[ -d "/var/lib/rancher/rke2/agent/tls" ]]; then
dir="/var/lib/rancher/rke2/agent/tls"
else
dir="/var/lib/rancher/rke2/agent/"
fi
# Loop through each .crt file in the directory
for file in "$dir"/*.crt; do
# Extract the expiry date from the certificate
expiry=$(openssl x509 -enddate -noout -in "$file" | cut -d= -f 2-)
# Get the file name without the path
filename=$(basename "$file")
# Print the filename and expiry date in a pretty format
printf "%-30s %s\n" "$filename:" "$expiry"
doneif [[ -d "/var/lib/rancher/rke2/server/tls" ]]; then
dir="/var/lib/rancher/rke2/server/tls"
elif [[ -d "/var/lib/rancher/rke2/agent/tls" ]]; then
dir="/var/lib/rancher/rke2/agent/tls"
else
dir="/var/lib/rancher/rke2/agent/"
fi
# Loop through each .crt file in the directory
for file in "$dir"/*.crt; do
# Extract the expiry date from the certificate
expiry=$(openssl x509 -enddate -noout -in "$file" | cut -d= -f 2-)
# Get the file name without the path
filename=$(basename "$file")
# Print the filename and expiry date in a pretty format
printf "%-30s %s\n" "$filename:" "$expiry"
done得られる出力は、次の画像のようになります。
RKE2 証明書をローテーションする
既定では、RKE2 証明書は 12 か月で有効期限が切れます。 有効期限の 90 日前に RKE2 を再起動すると、証明書がローテーションされます。 ただし、証明書の有効期間が 90 日を超える場合は、「 RKE2 - Advanced Options - Certificate rotation」に記載されている手順に従って、証明書を手動でローテーションする必要があります。
特定の要件を満たすように RKE2 証明書の有効期限をカスタマイズする場合は、サーバー ノードとエージェント ノードの両方で RKE2 サービスを再起動する前にカスタマイズできます。
RKE2 の証明書をローテーションするには、最初にサーバー ノードで一連の操作を実行してから、エージェント ノードでいくつかの手順を続行します。
- RKE2 サーバーを停止します。
systemctl stop rke2-server.servicesystemctl stop rke2-server.service - 残りの RKE2 プロセスをすべてクリアします。
rke2-killall.shrke2-killall.sh /var/lib/rancher/rke2/server/tls/にあるdynamic-cert.jsonファイルを削除します。-
RKE2 証明書の有効期限をカスタマイズするには、次のコマンドを使用します。 この例では有効期間を 1000 日に設定していますが、この値は要件に基づいて変更できます。
SERVICE_NAME="rke2-server.service" conf_file_path="/etc/systemd/system/${SERVICE_NAME}.d/cert.conf" mkdir -p /etc/systemd/system/"${SERVICE_NAME}".d/ cat > "$conf_file_path" <<EOF [Service] Environment="CATTLE_NEW_SIGNED_CERT_EXPIRATION_DAYS=1000" EOF systemctl daemon-reloadSERVICE_NAME="rke2-server.service" conf_file_path="/etc/systemd/system/${SERVICE_NAME}.d/cert.conf" mkdir -p /etc/systemd/system/"${SERVICE_NAME}".d/ cat > "$conf_file_path" <<EOF [Service] Environment="CATTLE_NEW_SIGNED_CERT_EXPIRATION_DAYS=1000" EOF systemctl daemon-reload - RKE2 サーバーを再起動します。
systemctl start rke2-server.servicesystemctl start rke2-server.service注: クラスターに複数のサーバー ノードがある場合、手順 1 から 4 を完全には実行できないことがあります。これは etcd がリーダーの選出を完了できないためです。この場合は、他のサーバー ノードで手順 1 から 4 を繰り返します。 kube-system名前空間からrke2-servingシークレットを削除します。kubectl delete secret -n kube-system rke2-servingkubectl delete secret -n kube-system rke2-serving注:マルチノード デプロイでは、必要な数のサーバー ノードで最初の 4 つの操作を完了するまで、kubectlコマンドを実行できない場合があります。これは、etcd クォーラム要件を満たすためです。rke2-servingシークレットは、RKE2 サーバーが起動したらすぐに削除できます。
kubectl get nodes コマンドが正常に実行されたことを確認できます。サーバー ノードの準備ができたら、エージェント ノードの操作に進んで証明書を再生成できます。
エージェント ノードで次の手順を実行します。
- RKE2 サーバーを停止します。
systemctl stop rke2-agent.servicesystemctl stop rke2-agent.service - 残りの RKE2 プロセスをすべてクリアします。
rke2-killall.shrke2-killall.sh -
RKE2 証明書の有効期限をカスタマイズするには、次のコマンドを使用します。 この例では有効期間を 1000 日に設定していますが、この値は要件に基づいて変更できます。
SERVICE_NAME="rke2-agent.service" conf_file_path="/etc/systemd/system/${SERVICE_NAME}.d/cert.conf" mkdir -p /etc/systemd/system/"${SERVICE_NAME}".d/ cat > "$conf_file_path" <<EOF [Service] Environment="CATTLE_NEW_SIGNED_CERT_EXPIRATION_DAYS=1000" EOF systemctl daemon-reloadSERVICE_NAME="rke2-agent.service" conf_file_path="/etc/systemd/system/${SERVICE_NAME}.d/cert.conf" mkdir -p /etc/systemd/system/"${SERVICE_NAME}".d/ cat > "$conf_file_path" <<EOF [Service] Environment="CATTLE_NEW_SIGNED_CERT_EXPIRATION_DAYS=1000" EOF systemctl daemon-reload - RKE2 サーバーを再起動します。
systemctl start rke2-agent.servicesystemctl start rke2-agent.service