当前位置: 首页 > news >正文

自适应网站用什么软件设计wordpress自动添加视频教程

自适应网站用什么软件设计,wordpress自动添加视频教程,国示建设网站,网站建设与运营 就业文章目录 使用 Kubernetes 部署 Redis 主从及 Sentinel 高可用架构Redis 主从架构部署 (1.yaml)Redis Sentinel 部署 (2.yaml)Sentinel 服务暴露 (3.yaml)部署步骤总结 使用 Kubernetes 部署 Redis 主从及 Sentinel 高可用架构 本文将详细介绍如何在 Kubernetes 中部署 Redis … 文章目录 使用 Kubernetes 部署 Redis 主从及 Sentinel 高可用架构Redis 主从架构部署 (1.yaml)Redis Sentinel 部署 (2.yaml)Sentinel 服务暴露 (3.yaml)部署步骤总结 使用 Kubernetes 部署 Redis 主从及 Sentinel 高可用架构 本文将详细介绍如何在 Kubernetes 中部署 Redis 主从及 Sentinel 高可用架构提供完整的 YAML 配置文件并逐步解析其关键配置。命名空间已调整为 test。 我这是单点未做共享存储版 Redis 主从架构部署 (1.yaml) 首先使用 StatefulSet 部署 Redis 主从结构每个实例通过主机名确定角色 apiVersion: apps/v1 kind: StatefulSet metadata:name: redisnamespace: test spec:serviceName: redisreplicas: 3selector:matchLabels:app: redistemplate:metadata:labels:app: redisspec:initContainers:- name: init-redisimage: docker.wctmd.us.kg/busybox:latestcommand: [/bin/sh, -c]args: [mkdir -p /data/redis/$(hostname)]volumeMounts:- name: redis-datamountPath: /datacontainers:- name: redisimage: docker.wctmd.us.kg/redis:5.0.14ports:- containerPort: 6379command: [/bin/sh]args: - -c- |if [ $(hostname) redis-0 ]; thenredis-server --port 6379 --protected-mode no --replica-announce-ip $(hostname).rediselseredis-server --port 6379 --protected-mode no --replicaof redis-0.redis 6379 --replica-announce-ip $(hostname).redisfivolumeMounts:- name: redis-datamountPath: /datavolumes:- name: redis-datahostPath:path: /data/redistype: DirectoryOrCreate关键点解析 主从自动识别redis-0 为主节点其它 Pod 配置为从节点并通过 --replicaof 指定主节点。数据持久化使用 hostPath 存储 Redis 数据映射到宿主机的 /data/redis。独立目录管理通过 initContainer 动态创建 /data/redis/$(hostname)避免目录冲突。 Redis Sentinel 部署 (2.yaml) 接下来部署 Sentinel 来监控 Redis 主从并实现自动故障转移 apiVersion: apps/v1 kind: Deployment metadata:name: redis-sentinelnamespace: test spec:replicas: 3selector:matchLabels:app: redis-sentineltemplate:metadata:labels:app: redis-sentinelspec:containers:- name: redis-sentinelimage: docker.wctmd.us.kg/redis:5.0.14ports:- containerPort: 26379command: [ redis-sentinel ]args: [/data/sentinel.conf]volumeMounts:- name: sentinel-confmountPath: /datainitContainers:- name: init-sentinelimage: docker.wctmd.us.kg/busybox:latestcommand: [/bin/sh, -c]args:- cp /etc/redis/sentinel.conf /data/sentinel.conf chmod 600 /data/sentinel.confvolumeMounts:- name: sentinel-confmountPath: /data- name: config-volumemountPath: /etc/redisvolumes:- name: sentinel-confemptyDir: {}- name: config-volumeconfigMap:name: sentinel-config --- apiVersion: v1 kind: ConfigMap metadata:name: sentinel-confignamespace: test data:sentinel.conf: |sentinel monitor mymaster redis-0.redis 6379 2sentinel down-after-milliseconds mymaster 5000sentinel failover-timeout mymaster 60000sentinel parallel-syncs mymaster 1关键点解析 动态配置文件管理通过 initContainer 将只读的 ConfigMap 文件复制到可写路径并调整权限。多实例部署使用 Deployment 创建 3 个 Sentinel 实例以实现高可用。监控配置ConfigMap 定义了 Sentinel 的监控规则包括主节点、超时、同步参数等。 Sentinel 服务暴露 (3.yaml) 最后通过 Service 将 Sentinel 对外暴露便于外部访问 apiVersion: v1 kind: Service metadata:name: redis-sentinelnamespace: test spec:type: NodePortports:- nodePort: 30154port: 26379targetPort: 26379protocol: TCPselector:app: redis-sentinel关键点解析 外部访问支持使用 NodePort 暴露 Sentinel 服务监听宿主机的 30154 端口。服务选择器通过标签 app: redis-sentinel 将流量路由到 Sentinel Pod。 部署步骤 创建命名空间 testkubectl create namespace test应用 1.yaml 部署 Rediskubectl apply -f 1.yaml应用 2.yaml 部署 Sentinelkubectl apply -f 2.yaml应用 3.yaml 创建服务kubectl apply -f 3.yaml验证部署状态kubectl -n test get pods kubectl -n test get svc总结 本文展示了如何使用 Kubernetes 部署 Redis 主从架构和 Sentinel 高可用集群。通过灵活的 StatefulSet 和 Deployment 配置我们实现了高可靠性和动态配置管理同时确保数据持久化和集群安全性。 建议在生产环境中可以进一步优化存储方案如使用 PersistentVolume并增强安全配置如启用 Redis/Sentinel 认证。
http://www.hkea.cn/news/14405452/

相关文章:

  • 天津品牌网站设计如何确认建设银行网站不是假的
  • 老鹰主机做的网站2021拉新推广佣金排行榜
  • 安徽鑫华建设有限公司网站建立网站的条件
  • 网站制作论文企业对公账户查询系统
  • 江门网站建设外包过时的网站
  • 中山森斯网站建设公司做动画片的网站
  • 南昌 网站 公司ida设计公司上海
  • 阿里巴巴国际网站怎么做淘宝客建设网站
  • 网站导航栏字体旅游设计专业网站
  • wp网站模板安装简单好看个人主页网站模板
  • 平湖网站建设流程素材网下载
  • seo站长论坛连云港企业网站制作
  • 中心网站建设网站设计服务费做什么费用
  • 企业网站建设套餐费用建设银行网站网址是什么
  • 89点班组建设网站宁波网站建设zj95
  • 珠海做网站推广公司采纳品牌营销策划公司
  • 山西做网站的公司宣传推广方式有哪些
  • 免费 网站源码天美传媒传媒官网免费下载
  • 郑州网站建设招聘平面设计网上接单
  • 网站改版竞品分析怎么做wordpress怎么使用固定连接
  • 做微信投票的网站5网站程可以自己做吗
  • 网站域名被重定向wordpress error
  • 宝安专业网站设计公司传媒公司名称
  • 天津网站建设定制安装wordpress出现500
  • 小清新网站源码wordpress注册怎样通过邮箱验证码
  • 网站建设 教材公众号 上传 wordpress
  • 滕州 网站 建设微小店网站建设用途
  • html5移动端网站开发教程中英文微信网站建设
  • 北京网站建设 降龙网做视频采集网站犯法
  • 外贸网站优化软件做网站的行业平台