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

政务公开网站建设重点南宁正规的seo费用

政务公开网站建设重点,南宁正规的seo费用,未来做哪些网站能致富,乔拓云网站建设使用背景和场景 业务中的某个关键服务#xff0c;配置了多个replica#xff0c;结果在部署时#xff0c;发现多个相同的副本同时部署在同一个主机上#xff0c;结果主机故障时#xff0c;所有副本同时漂移了#xff0c;导致服务间断性中断 基于以上背景#xff0c;实现…使用背景和场景 业务中的某个关键服务配置了多个replica结果在部署时发现多个相同的副本同时部署在同一个主机上结果主机故障时所有副本同时漂移了导致服务间断性中断 基于以上背景实现一个服务的多个副本分散到不同的主机上使每个主机有且只能运行服务的一个副本这里用到的是Pod anti-affinity属性即pod反亲和性特性是根据已经运行在node上的pod的label不再将相同label的pod也调度到该node实现每个node上只运行一个副本的pod pod亲和性和反亲和性的区别 亲和性podAffinity和指定label的pod部署在相同node上 反亲和性podAntiAffinity不想和指定label的pod的服务部署在相同node上 podAntiAffinity实战部署 反亲和性分软性要求和硬性要求 requiredDuringSchedulingIgnoredDuringExecution硬性要求必须满足条件保证分散部署的效果最好使用用此方式 preferredDuringSchedulingIgnoredDuringExecution软性要求可以不完全满足即有可能同一node上可以跑多个副本 # 配置如下只需要修改label的配置即matchExpressions中的key和values的值# 硬性要求 # 如果节点上的pod标签存在满足appnginx则不能部署到节点上spec:affinity:podAntiAffinity:requiredDuringSchedulingIgnoredDuringExecution:- labelSelector:matchExpressions:- key: appoperator: Invalues:- nginxtopologyKey: kubernetes.io/hostname# 软性要求 # 如果节点上的pod标签存在满足appnginx也可以部署到节点上尽可能先部署到其它节点如果没有满足也可以部署到此节点大概是这么理解吧spec:affinity:podAntiAffinity:preferredDuringSchedulingIgnoredDuringExecution:- weight: 100podAffinityTerm:- labelSelector:matchExpressions:- key: appoperator: Invalues:- nginxtopologyKey: kubernetes.io/hostname 附完整的deployment.yaml配置 apiVersion: apps/v1 kind: Deployment metadata:name: nginxlabels:app: nginx spec:replicas: 3strategy:rollingUpdate:maxSurge: 30%maxUnavailable: 0type: RollingUpdateminReadySeconds: 10selector:matchLabels:app: nginxtemplate:metadata:labels:app: nginxspec:affinity:podAntiAffinity:requiredDuringSchedulingIgnoredDuringExecution:- labelSelector:matchExpressions:- key: appoperator: Invalues:- nginxtopologyKey: kubernetes.io/hostnamerestartPolicy: Alwayscontainers:- name: nginximage: nginximagePullPolicy: IfNotPresentports:- containerPort: 80name: httpprotocol: TCP实际生产环境用的pod反亲和性 podAntiAffinity:requiredDuringSchedulingIgnoredDuringExecution:# Never schedule multiple replicas on the same node- topologyKey: kubernetes.io/hostnamelabelSelector:matchLabels:app.kubernetes.io/name: ${service}app.kubernetes.io/instance: ${service} apiVersion: apps/v1 kind: Deployment metadata:name: ${service}labels:app.kubernetes.io/name: ${service}app.kubernetes.io/version: 0.0.0app.kubernetes.io/instance: ${service}environment: ${env} spec:replicas: ${replicas}revisionHistoryLimit: 5selector:matchLabels:app.kubernetes.io/name: ${service}strategy:rollingUpdate:maxSurge: 25%maxUnavailable: 25%type: RollingUpdatetemplate:metadata:labels:app.kubernetes.io/name: ${service}app.kubernetes.io/version: 0.0.0app.kubernetes.io/instance: ${service}logging: falsearmsPilotAutoEnable: offarmsPilotCreateAppName: ${service}-${env}spec:serviceAccountName: defaultdnsPolicy: ClusterFirstimagePullSecrets:- name: gemdale-registry.cn-shenzhen.cr.aliyuncs.com-secretcontainers:- name: ${service}image: ${image}imagePullPolicy: IfNotPresentenv:- name: CONSUL_HOSTvalueFrom:fieldRef:fieldPath: status.hostIP- name: ELASTIC_APM_SERVER_URLSvalue: http://apm-server.logging:8200- name: HOST_IPvalueFrom:fieldRef:fieldPath: status.hostIP- name: SERVER_PORTvalue: 80- name: JAVA_OPTSvalue: -Duser.timezoneAsia/Shanghai- name: WFWAPPvalue: wfw-applogvolumeMounts:- mountPath: /data/appdata/name: appdata- mountPath: /data/config-repo/name: config-repo- mountPath: /data/logs/name: logs- mountPath: /mnt/hgfs/name: mnt-hgfsports:- containerPort: 80name: httpresources:{}affinity:nodeAffinity:requiredDuringSchedulingIgnoredDuringExecution:nodeSelectorTerms:- matchExpressions:- key: microserviceoperator: Invalues:- truepodAntiAffinity:requiredDuringSchedulingIgnoredDuringExecution:# Never schedule multiple replicas on the same node- topologyKey: kubernetes.io/hostnamelabelSelector:matchLabels:app.kubernetes.io/name: ${service}app.kubernetes.io/instance: ${service}volumes:- hostPath:path: /data/appdata/type: DirectoryOrCreatename: appdata- hostPath:path: /data/config-repo/type: DirectoryOrCreatename: config-repo- hostPath:path: /data/logs/type: DirectoryOrCreatename: logs- hostPath:path: /mnt/hgfs/type: DirectoryOrCreatename: mnt-hgfs --- apiVersion: v1 kind: Service metadata:name: ${service}labels:app.kubernetes.io/name: ${service}app.kubernetes.io/version: 0.0.0app.kubernetes.io/instance: ${service}environment: ${env} spec:type: ClusterIPports:- name: httpport: 80protocol: TCPtargetPort: httpselector:app.kubernetes.io/name: ${service}app.kubernetes.io/instance: ${service}
http://www.zqtcl.cn/news/657127/

相关文章:

  • 建站之星演示谷歌网站建站
  • wordpress是建站工具 还是语言表格制作
  • 北京中国建设银行招聘信息网站店标logo图片免费制作
  • 网站建设分金手指专业二七文章网站是怎么做的
  • 东莞网站设计企业怎么制作手机app及网站
  • 林州做网站下载做蛋糕网站
  • 做网站改版的做实验用哪些国外网站
  • 什么是静态页面网站甜品网站建设方案
  • 做一个网站大概多少钱养生网站源码
  • 淘宝客网站建设分类校园网站开发设计报告
  • 个人网站模板 免费儿童编程培训机构
  • 运动健身型网站开发免费ddns域名注册
  • 专业pc网站建设wordpress 支持php7.1
  • 廊坊网站制作系统虚拟服务器搭建
  • 做网站的优势wordpress百度索引链接
  • 网站哪些功能是PHP做的wordpress 正文宽度
  • wordpress考试主题株洲优化公司
  • 怎么做企业网站建设方案怎样查网站有没有备案
  • 浙江短视频seo优化网站专做童装的网站
  • 印刷包装公司网站模板陕西住房和城乡建设厅网站
  • 成都响应式网站建设公司网站 建设的必要性
  • 江苏省建设局官方网站查询wordpress收到登录错误
  • 个人与企业签订网站开发合同北京个人网站建设
  • 阀门网站设计dede静态网站
  • 做暧暧视频网站在线网站建设项目推文
  • 岳池发展建设集团有限公司门户网站毕设做网站工作量够吗
  • 手机网站客户端设计与实现手机网站 焦点图
  • 网站建设常用的开发语言介绍设计公司官网首页
  • 做网站能拿多少钱视频策划方案怎么写
  • 权威的顺德网站建设dw不会写代码能建立网站吗