A redis master-slave cluster automatic deployment scheme based on kubernets
A cluster, master-slave technology, applied in transmission systems, electrical components, etc., can solve problems such as inability to achieve flexible deployment, and achieve the effect of ensuring the integrity of configuration parameters, flexibility, and separation
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Publication Date
- 2022-05-24
Smart Images

Figure 1 
Figure 2 
Figure 3
Abstract
Description
technical field
[0001] The invention discloses an automatic deployment scheme of a Redis master-slave cluster based on Kubernetes, and relates to the technical field of cluster deployment. Background technique
[0002] Kubernetes is an open source, used to manage containerized applications on multiple hosts in the cloud platform. The goal of Kubernetes is to make the deployment of containerized applications simple and efficient (powerful). A core feature of Kubernetes is the ability to manage containers autonomously. To ensure that the containers in the cloud platform run according to the user's desired state, the administrator can load a microservice and let the planner find the appropriate location.
[0003] Helm is a package management tool for Kubernetes that simplifies the deployment and management of Kubernetes applications. Helm can be compared to CentOS's yum tool. Helm has the following basic concepts:
[0004] Chart: It is an installation package managed by Helm...
Examples
Embodiment Construction
[0031] The invention provides a Kubernetes-based master-slave cluster automatic deployment solution for Redis. The configuration file of redis is transferred into the Helm installation package by means of a file stream, and the Helm configuration and startup logic are deployed in the configmap,
[0032] In redis-server-statefulset.yaml, use initContainers to mount various startup scripts into the PV required by the container. Various startup scripts are written into the configmap through file streams, and initContainers start the startup through the command command. The script performs the configuration installation,
[0033] Deploy the master-slave node pod and sentinel node of redis in Kubernetes.
[0034] At the same time, a Kubernetes-based Redis corresponding to the above method is provided, which is to transfer the configuration file of redis into the Helm installation package through a file stream, and deploy the configuration and startup logic of Helm in the configmap....