4.3.3. Microsoft Azure へのデータの保存
Azure Blob ストレージにデータを保存するには、既存のコンテナーを使用する必要があります。以下のサンプルの azure-blob-storage.yaml
ファイルで spec.storage
セクションを編集します。
apiVersion: metering.openshift.io/v1 kind: MeteringConfig metadata: name: "operator-metering" spec: storage: type: "hive" hive: type: "azure" azure: container: "bucket1" 1 secretName: "my-azure-secret" 2 rootDirectory: "/testDir" 3
テンプレートとして以下のシークレットサンプルを使用します。
apiVersion: v1 kind: Secret metadata: name: your-azure-secret data: azure-storage-account-name: "dGVzdAo=" azure-secret-access-key: "c2VjcmV0Cg=="
以下のコマンドを使用してシークレットを作成できます。
oc create secret -n openshift-metering generic your-azure-secret --from-literal=azure-storage-account-name=your-storage-account-name --from-literal=azure-secret-access-key=your-secret-key