在这种情况下,kubedb操作符已经崩溃并且没有响应——但是我需要清理这些资源。
k delete redis r1 redis-queue --namespace cts --force --grace-period=0
warning: Immediate deletion does not wait for confirmation that the running resource has been terminated. The resource may continue to run on the cluster indefinitely.
Error from server (InternalError): Internal error occurred: failed calling webhook "redis.validators.kubedb.com": the server is currently unable to handle the request
Error from server (InternalError): Internal error occurred: failed calling webhook "redis.validators.kubedb.com": the server is currently unable to handle the request
Run Code Online (Sandbox Code Playgroud) 我们在集群中使用KubeDB来管理我们的数据库。
因此 Redis 是通过KubeDB Redis 对象部署的,KubeDB 将 PVC 附加到 Redis pod。
不幸的是,KubeDB 尚不支持任何 Redis 转储的恢复或备份。
对于备份,我们的解决方案是运行 CronJob,它将dump.rdb
Redis pod 中的数据复制到作业 pod 中,然后将其上传到 S3。
对于转储的恢复,我想做同样的事情,只是反过来。有一个临时 pod,用于下载 S3 备份,然后将其复制到 Redis pod 中的dump.rdb
位置。
该redis.conf
如下所示:
....
# The filename where to dump the DB
dbfilename dump.rdb
# The working directory.
#
# The DB will be written inside this directory, with the filename specified
# above using the 'dbfilename' configuration directive.
#
# The Append …
Run Code Online (Sandbox Code Playgroud)