首页 > 解决方案 > 使用 Azure 创建 Redis 实例以及 Redis 配置 JSON 文件抛出错误

问题描述

我目前正在尝试使用典型示例通过 cli 为 azure 创建一个 redis 缓存

az redis create --location westus2 --name MyRedisCache --resource-group MyResourceGroup --sku Basic --vm-size c0

但是,我想做的是使用 ----redis-configuration 插件告诉 redis 我不想通过“requirepass”处理安全性:“属性

无论我如何尝试添加此属性,都会出现错误。

有没有人成功使用 --redis-configuration 来传递部署的额外要求?

标签: azureredisazure-cli

解决方案


考虑Azure Redis是一项完全托管的服务,其中 Microsoft 代表客户创建和管理 Redis 实例(更新、自动故障转移等),并非所有配置设置(如requirepass)都向用户公开。

查看 REST API 文档creating an Azure Redis instance,可以更改的配置设置很少:

rdb-backup-enabled,rdb-storage-connection-string,rdb-backup-frequency,maxmemory-delta,maxmemory-policy,notify-keyspace-events,maxmemory-samples,slowlog-log-slower-than,slowlog-max- len,list-max-ziplist-entries,list-max-ziplist-value,hash-max-ziplist-entries,hash-max-ziplist-value,set-max-intset-entries,zset-max-ziplist-entries, zset-max-ziplist-value 等。


推荐阅读