5.2. 为帐户重新生成 S3 凭证
流程
获取帐户名称。
要列出帐户,请运行以下命令:
$ noobaa account list
输出示例:
NAME ALLOWED_BUCKETS DEFAULT_RESOURCE PHASE AGE account-test [*] noobaa-default-backing-store Ready 14m17s test2 [first.bucket] noobaa-default-backing-store Ready 3m12s
或者,从终端运行
oc get noobaaaccount
命令:$ oc get noobaaaccount
输出示例:
NAME PHASE AGE account-test Ready 15m test2 Ready 3m59s
要重新生成 noobaa 帐户 S3 凭证,请运行以下命令:
$ noobaa account regenerate <noobaa_account_name> [options]
$ noobaa account regenerate FATA[0000] ❌ Missing expected arguments: <noobaa-account-name> Usage: noobaa account regenerate <noobaa-account-name> [flags] [options] Use "noobaa options" for a list of global command-line options (applies to all commands).
运行
noobaa account regenerate
命令后,它会提示您一个警告,"This will invalidate all connections between S3 clients and NooBaa which are connected using the current credentials.",并要求确认:例如:
$ noobaa account regenerate account-test
输出示例:
INFO[0000] You are about to regenerate an account's security credentials. INFO[0000] This will invalidate all connections between S3 clients and NooBaa which are connected using the current credentials. INFO[0000] are you sure? y/n
批准后,它会重新生成凭证并最终打印它们:
INFO[0015] ✅ Exists: Secret "noobaa-account-account-test" Connection info: AWS_ACCESS_KEY_ID : *** AWS_SECRET_ACCESS_KEY : ***