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

物流企业网站源码wordpress 地址设置

物流企业网站源码,wordpress 地址设置,产品介绍页面的制作 html,长沙做官网的公司Horizontal Pod Autoscaling:po的水平自动伸缩 这是k8s自带的模块 pod占用cpu比例达到一定的阀值#xff0c;会触发伸缩机制。 根据cpu的阀值触发伸缩机制 replication controller 副本控制器 控制pod的副本数 deployment controller 节点控制器 部署pod hpa控制副本的数…Horizontal Pod Autoscaling:po的水平自动伸缩 这是k8s自带的模块 pod占用cpu比例达到一定的阀值会触发伸缩机制。 根据cpu的阀值触发伸缩机制 replication controller 副本控制器 控制pod的副本数 deployment controller 节点控制器 部署pod hpa控制副本的数量以及如何控制部署pod 1、hpa基于kube-controll-manager服务周期性的检测pod的cpu使用率默认30秒检测一次 2、hpa和replication controllerdeployment controller都属于k8s的资源对象。通过跟踪分析副本控制器和deployment的pod的负载变化针对性的调整目标pod的副本数 阀值:在正常情况下pod的副本数以及达到阀值之后pod的扩容最大数量 3、组件:metrics-server 部署到集群中对外提供度量的数据 HPA的规则 1、定义pod时候必须要有资源限制否则hpa无法进行监控 2、扩容是即时的只要超过阀值会立刻扩容不是立刻扩容到最大副本数会在最大值和最小值波动如果扩容的数量满足了需求不会在扩容 3、缩容是缓慢的如果业务的峰值较高回收的策略太积极的话可能会产生业务的崩溃缩容的速度比较慢的 周期性的获取数据缩容的机制 HPA的部署运用 进行HPA的部署设置 //在所有 Node 节点上传 metrics-server.tar 镜像包到 /opt 目录 cd /opt/ docker load -i metrics-server.tar#在主master节点上执行 kubectl apply -f components.yaml HPA伸缩的测试演示 apiVersion: apps/v1 kind: Deployment metadata:name: centos-testlabels:test: centos1 spec:replicas: 1selector:matchLabels:test: centos1template:metadata:labels:test: centos1spec:containers:- name: centosimage: centos:7command: [/bin/bash, -c, yum -y install epel-release;yum -y install stress;sleep 3600]resources:limits:cpu: 1memory: 512Mi --- apiVersion: autoscaling/v2beta2 kind: HorizontalPodAutoscaler metadata:name: hpa-centos7 spec:scaleTargetRef:apiVersion: apps/v1kind: Deploymentname: centos-testminReplicas: 1maxReplicas: 5metrics:- type: Resourceresource:name: cputargetAverageUtilization: 50命名空间资源限 ResourceQuota:命名空间进行资源限制 apiVersion: apps/v1 kind: Deployment metadata:name: centos-test1namespace: test1labels:test: centos2 spec:replicas: 6selector:matchLabels:test: centos2template:metadata:labels:test: centos2spec:nodeSelector:kubernetes.io/hostname: node01containers:- name: centosimage: centos:7command: [/bin/bash, -c, yum -y install epel-release;yum -y install stress;sleep 3600]resources:limits:cpu: 1memory: 512Mi --- apiVersion: v1 kind: ResourceQuota metadata:name: ns-resourcenamespace: test1 spec:hard:pods: 10requests.memory: 1Gilimits.cpu: 4limits.memory: 2Giconfigmaps: 10 #在当前这个命名空间能创建最大configmap数量10个persistentvolumeclaims: 4 #当前命名空间只能使用4个pvcsecrets: 9 #创建贾母的secret只能9个services: 5 #创建service个数只能五个services.nodeports: 2 #创建nodeport类型的svc只能两个 只能在命名空间创建两个service第三个就不创建了因为限制了最多只能创建两个 第二种LimitRange apiVersion: apps/v1 kind: Deployment metadata:name: centos-test3namespace: test3labels:test: centos3 spec:replicas: 1selector:matchLabels:test: centos3template:metadata:labels:test: centos3spec:containers:- name: centos3image: centos:7command: [/bin/bash, -c, yum -y install epel-release;yum -y install stress;sleep 3600] ---apiVersion: v1 kind: LimitRange metadata:name: test3-limitnamespace: test3 spec:limits:- default:memory: 512Micpu: 1defaultRequest:memory: 256Micpu: 0.5type: Container pod的副本数扩缩容有两种方式 1、手动方式kubectl scale deployment nginx1 --replicas5kubectl edit,修改yaml文件 apply -f 2、自动扩缩容 hpa 监控指标是cpu和内存没关系 资源限制 pod资源限制 命名空间资源限 ucky-cloud项目--部署在test1的命名空间如果lucky-cloud不做限制或者命名空间不做限制他会依然会沾满所有集群资源 k8s集群部署pod的最大数量:10000 busybox就是服务最小化的centos 4M 哪些服务会部署在k8s当中 中间件 kafka: 6 redis: 3 选好节点 用nodeName固定在一个pod上扩容之后阀值是否会下降 apiVersion: apps/v1 kind: Deployment metadata:name: centos-test8labels:test: centos8 spec:replicas: 3selector:matchLabels:test: centos8template:metadata:labels:test: centos8spec:nodeSelector:kubernetes.io/hostname: node01containers:- name: centos8image: centos:7command: [/bin/bash, -c, yum -y install epel-release;yum -y install stress;sleep 3600]resources:limits:cpu: 2memory: 512Mi --- apiVersion: autoscaling/v1 kind: HorizontalPodAutoscaler metadata:name: hpa-centos7 spec:scaleTargetRef:apiVersion: apps/v1kind: Deploymentname: centos-test8minReplicas: 1maxReplicas: 5targetCPUUtilizationPercentage: 50 总结 HPA的自动扩缩容 命令空间两种方式 ResourceQuota:可以对命名空间进行资源限制 第二种LimitRange:直接声明在命名空间当中创建pod容器的资源限制只是一种统一的限制所有的pod都受这个条件的制约 pod资源限制 一般是我们创建的时候声明好的必加选项 resources limit 命名空间资源限制:对命名空间使用cpu和内存一定会做限制通过 核心:防止整个集群的资源被一个服务或者一个命名空间沾满 ResourceQuata 命名空间统一资源限制在pod LimitRange
http://www.pierceye.com/news/192945/

相关文章:

  • 网站管理制度建设开发一个网站需要多少时间
  • 高校网站建设说明书微信公众号涨粉 网站
  • 深圳网站建设公司哪里好中国施工企业管理协会官网
  • 网站自动抢注步步高学习机进网站怎么做
  • 带域名的网站打不开深圳网站优化多少钱
  • 中国空间站科幻作文1000字网站建设从化
  • 做网站买一个域名就够了吗cn域名知名网站
  • 社科联网站建设个人网页英文
  • 做房产推广那个网站好网站改版建设原则
  • 网站建设 语言成都app
  • 免费建站的手机app专业做网站设计公司价格
  • 江苏宜兴做网站的电话seo基础培训
  • 企业手机端网站模板下载济南公司建站模板
  • 一般公司做网站多少钱南昌市房产网
  • 惠州网站小程序建设做公司永久免费网站什么好
  • 湖南涟钢建设有限公司网站局网站建设工作总结
  • 家乡ppt模板免费下载网站合肥百姓网网站建设
  • 免费整套ppt模板下载网站东莞建设教育网站
  • 漯河网站建设漯河ps制作个人网站首页
  • 电商网站公司软件开发和软件研发
  • 网站建设浙江公司网站开发运营新人要注意什么
  • 外贸网站模板哪里下载家里电脑可以做网站服务器吗
  • 长沙门户网站北京设计网站的公司
  • 站长统计平面设计找工作难吗
  • seo建站公司推荐电商平台活动策划方案
  • 建设淘宝客网站.lc和ev手机对比平台
  • vue 做企业网站特产网站开发背景
  • 奉新网站制作dede视频网站源码
  • 做动画网站去哪采集建设网站需要的资金清单
  • 网站后台发邮件注册公司需要什么证件和手续