K3sへのSUSE Multi-Linux Manager 5.1プロキシの配備
1. K3sのインストール
|
SUSE Multi-Linux Managerプロキシは、シングルノードクラスタのSL Micro上で実行されるk3sでサポートされます。他のKubernetes環境に配備する必要がある場合は、サポートに連絡して評価を依頼してください。 |
On the container host machine, install K3s (replace <K3S_HOST_FQDN> with the FQDN of your K3s host):
curl -sfL https://get.k3s.io | INSTALL_K3S_EXEC="--tls-san=<K3S_HOST_FQDN>" sh -
2. ツールのインストール
The installation requires the mgrpxy and helm packages.
The mgrpxy and helm packages are available in the SUSE Multi-Linux Manager Proxy product repositories.
-
インストールするには、次のコマンドを実行します。
transactional-update pkg install helm mgrpxy -
再起動
2.1. Web UIを使用したプロキシ設定の生成
Web UIで、に移動し、必要なデータを入力します。
In the
Proxy FQDNfield type fully qualified domain name for the proxy.In the
Parent FQDNfield type fully qualified domain name for the SUSE Multi-Linux Manager Server or another SUSE Multi-Linux Manager Proxy.In the
Proxy SSH portfield type SSH port on which SSH service is listening on SUSE Multi-Linux Manager Proxy. Recommended is to keep default 8022.In the
Max Squid cache size [MB]field type maximal allowed size for Squid cache. Recommended is to use at most 80% of available storage for the containers.
2 GBはプロキシSquidのデフォルトのキャッシュサイズを表します。これは、環境に合わせて調整する必要があります。
In the
SSL certificateselection list choose if new server certificate should be generated for SUSE Multi-Linux Manager Proxy or an existing one should be used. You can consider generated certificates as SUSE Multi-Linux Manager builtin (self signed) certificates.+
選択に応じて、新しい証明書を生成するための署名CA証明書へのパス、またはプロキシ証明書として使用される既存の証明書とそのキーへのパスのいずれかを指定します。
+
The CA certificates generated by the server are stored in the
/var/lib/containers/storage/volumes/root/_data/ssl-builddirectory.+
既存の証明書またはカスタム証明書、および企業証明書と中間証明書の概念の詳細については、SSL証明書のインポートを参照してください。
Click Generate to register a new proxy FQDN in the SUSE Multi-Linux Manager Server and generate a configuration archive (
config.tar.gz) containing details for the container host.しばらくすると、ダウンロードするファイルが表示されます。このファイルをローカルに保存します。
2.2. Generate Proxy Configuration With spacecmd and Self-Signed Certificate
You can generate a Proxy configuration using spacecmd.
SSHでコンテナホストに接続します。
次のコマンドを実行してサーバとプロキシFQDNを置き換えます。
mgrctl exec -ti 'spacecmd proxy_container_config_generate_cert -- dev-pxy.example.com dev-srv.example.com 2048 email@example.com -o /tmp/config.tar.gz'生成された設定をサーバコンテナからコピーします。
mgrctl cp server:/tmp/config.tar.gz .
2.3. Generate Proxy Configuration With spacecmd and Custom Certificate
You can generate a Proxy configuration using spacecmd for custom certificates rather than the default self-signed certificates.
サーバコンテナホストにSSHで接続します。
次のコマンドを実行してサーバとプロキシFQDNを置き換えます。
for f in ca.crt proxy.crt proxy.key; do mgrctl cp $f server:/tmp/$f done mgrctl exec -ti 'spacecmd proxy_container_config -- -p 8022 pxy.example.com srv.example.com 2048 email@example.com /tmp/ca.crt /tmp/proxy.crt /tmp/proxy.key -o /tmp/config.tar.gz'設定で中間CAを使用する場合は、それもコピーし、
-iオプション付きでコマンドに含めます(必要に応じて複数回指定できます)。mgrctl cp intermediateCA.pem server:/tmp/intermediateCA.pem mgrctl exec -ti 'spacecmd proxy_container_config -- -p 8022 -i /tmp/intermediateCA.pem pxy.example.com srv.example.com 2048 email@example.com /tmp/ca.crt /tmp/proxy.crt /tmp/proxy.key -o /tmp/config.tar.gz'生成された設定をサーバコンテナからコピーします。
mgrctl cp server:/tmp/config.tar.gz .
3. SUSE Multi-Linux ManagerプロキシHelmチャートの配備
SUSE Multi-Linux Managerプロキシポッドで使用するボリュームのストレージを設定するには、次のクレームに対して永続ボリュームを定義します。ストレージ設定をカスタマイズしない場合は、K3sによって自動的にストレージボリュームが作成されます。
永続ボリュームのクレームの名前は次のとおりです。
-
squid-cache-pv-claim -
package-cache-pv-claim -
tftp-boot-pv-claim
Create the configuration for the SUSE Multi-Linux Manager Proxy as documented in SUSE Multi-Linux Manager Proxy Deployment. Copy the configuration tar.gz file and then install:
mgrpxy install kubernetes /path/to/config.tar.gz
詳細については、https://kubernetes.io/docs/concepts/storage/persistent-volumes/ (kubernetes)またはhttps://rancher.com/docs/k3s/latest/en/storage/ (K3s)のドキュメントを参照してください。