在 MinIO 中,所有配置更改都可以使用 mc admin config get/set/reset/export/import 命令进行。如下:
(1)列出所有可用的配置键
mc admin config set myminio/
(2)获取每个键的帮助
mc admin config set myminio/ <key>
命令“mc admin config set myminio/ etcd”将返回 etcd 参数可用的配置。如下:
D:\server\minio>mc admin config set local/ etcd KEY: etcd federate multiple clusters for IAM and Bucket DNS ARGS: endpoints* (csv) comma separated list of etcd endpoints e.g. "http://localhost:2379" path_prefix (path) namespace prefix to isolate tenants e.g. "customer1/" coredns_path (path) shared bucket DNS records, default is "/skydns" client_cert (path) client cert for mTLS authentication client_cert_key (path) client cert key for mTLS authentication comment (sentence) optionally add a comment to this setting
要为每个配置参数获得等效的 ENV(环境变量),请使用 --env 选项,如下:
D:\server\minio>mc admin config set local/ etcd --env KEY: etcd federate multiple clusters for IAM and Bucket DNS ARGS: MINIO_ETCD_ENDPOINTS* (csv) comma separated list of etcd endpoints e.g. "http://localhost:2379" MINIO_ETCD_PATH_PREFIX (path) namespace prefix to isolate tenants e.g. "customer1/" MINIO_ETCD_COREDNS_PATH (path) shared bucket DNS records, default is "/skydns" MINIO_ETCD_CLIENT_CERT (path) client cert for mTLS authentication MINIO_ETCD_CLIENT_CERT_KEY (path) client cert key for mTLS authentication MINIO_ETCD_COMMENT (sentence) optionally add a comment to this setting
上面的 mc admin config set 命令和 --env 选项对其他参数效果都是一样的。