1.4.2.2. cloud-init 設定の作成
cloud-init 設定を作成するには、以下の手順を実行します。
新しい Red Hat Edge Manager エージェントの登録設定を要求し、それを
config.yamlというファイルに保存します。以下のコマンドを実行します。flightctl certificate request --signer=enrollment --expiration=365d --output=embedded > config.yaml初回起動時にエージェント設定を正しい場所に配置する
cloud-config.yamlという名前のクラウド設定ユーザーデータファイルを作成します。以下のコマンドを実行します。cat <<EOF > cloud-config.yaml #cloud-config write_files: - path: /etc/flightctl/config.yaml content: $(cat config.yaml | base64 -w0) encoding: b64 EOFクラウド設定ユーザーデータファイルを含む Kubernetes
Secretを作成します。oc create secret generic enrollment-secret --from-file=userdata=cloud-config.yaml