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

电子商务怎样建立网站的锦州网站开发招聘

电子商务怎样建立网站的,锦州网站开发招聘,怎么做外贸电商,做网站公司 衡阳公司一、DemonSet的介绍 1、什么是DemonSet DaemonSet 控制器是用来保证在所有节点上运行一个 Pod 的副本当有节点加入集群时#xff0c; 也会为他们新增一个 Pod。 当有节点从集群移除时#xff0c;这些 Pod 也会被回收。删除 DaemonSet 将会删除它创建的所有 Pod。 简而言之…一、DemonSet的介绍 1、什么是DemonSet DaemonSet 控制器是用来保证在所有节点上运行一个 Pod 的副本当有节点加入集群时 也会为他们新增一个 Pod。 当有节点从集群移除时这些 Pod 也会被回收。删除 DaemonSet 将会删除它创建的所有 Pod。 简而言之 pod不会因为node的故障的转移而转移pod固定在指定的node的work节点中 DemonSet跟Deployment的不同是Deployment是可以在不同的node进行故障漂移 2、DemonSet的典型用法 在每个节点上运行集群存储守护进程如:Gluster、Ceph在每个节点上运行日志收集守护进程如:fluentd、FilebeatLogstash在每个节点上运行监控守护进程如: Prometheus NodeExporter在每个节点上运行网络插件为Pod提供网络服务如: flannel、calico 3、DemonSet的编写 DaemonSet 是标准的API资源类型它在spec字段中嵌套字段有selector、tempalte与Deployment用法基本相同但DaemonSet 不管理 Replicas因为 DaemonSet不是基于期望的副本数而是基于节点数量来控制Pod数量 4、DemonSet的使用示例 apiVersion: apps/v1 kind: DaemonSet metadata:name: nginx-dsnamespace: default spec:selector:matchLabels:app: nginx-dstemplate:metadata:labels:app: nginx-dsspec:containers:- name: nginx-dsimage: nginx:1.16ports:- name: httpcontainerPort: 80 livenessProbe:tcpSocket:port: 80initialDelaySeconds: 5livenessProbe: # 就绪 监听80端口如果80不存在则重启httpGet:path: /port: 80scheme: HTTPinitialDelaySeconds: 5 查看和删除daemonset还会在现在的node创建pod 5、Daemonset采用节点标签进行部署 实验一 给DamonSet只做节点标签node打了标签的才会创建pod apiVersion: apps/v1 kind: DaemonSet metadata:name: nginx-dsnamespace: default spec:selector:matchLabels:app: nginx-dstemplate:metadata:labels:app: nginx-dsspec:nodeSelector: #节点标签选择器type: ssd #节点标签在node上打的标签containers:- name: nginx-dsimage: nginx:1.16ports:- name: httpcontainerPort: 80 livenessProbe:tcpSocket:port: 80initialDelaySeconds: 5livenessProbe: # 就绪 监听80端口如果80不存在则重启httpGet:path: /port: 80scheme: HTTPinitialDelaySeconds: 5 从查看结果看并没有进行创建因为没有node服务标签选择器的要求查看节点标签 kubectl get node --show-labels给节点打标签 kubectl label nodes node1 typessd查看标签 kubectl get node --show-labels | grep node1kubectl describe node node1 ##查看labels字段kubectl describe node node1 | grep -A 5 Labelskubectl label nodes node1 node2 typessd ## 连续给两个节点进行打标签查看pod创建结果 kubectl get pod -o wide ## 查看pod创建在node节点中符合场景要求 kubectl get daemonset -o wide 删除label标签 方法一 kubectl label nodes node1 type-6、DaemonSet示例二 DaemonSet部署node_exporter 1.为每个节点都运行一份 Node_exporter采集当前节点的信息: apiVersion: apps/v1 kind: DaemonSet metadata:name: node-exportsnamespace: default spec:selector:matchLabels:app: node-exportertemplate:metadata:labels:app: node-exporterspec:hostNetwork: true ##共享主机网络hostPID: true ##获取主机的PIDcontainers:- name: prometheus-node-exporterimage: prom/node-exporter:v0.18.0ports:- name: node-ex-httpcontainerPort: 9100hostPort: 9100##存活探测和就绪探测livenessProbe:tcpSocket:port: node-ex-http ##存活探测探测port的name其实就是探测端口9100initialDelaySeconds: 5 ##存活探测时间为5秒readinessProbe:httpGet:path: /metrics ## 就绪探针这是一个固定的接口port: node-ex-http ## 就绪探针探测port的name其实就是探测端口9100initialDelaySeconds: 5 ## 就绪探针时间为5秒查看相关信息 kubectl get daemonsets ##查看daemonset创建的响应信息 kubectl describe daemonsets.apps node-exports ## 查看daemonset详情信息 kubectl get pod -o wide 测试 curl -s 192.168.1.201:9100/metrics | grep load15 ## 15分钟的负载信息 也可以使用浏览器进行访问访问默认的9100端口7、DaemonSet的更新策略 DaemonSet也支持更新策略它支持 OnDeLete 和 RollingUpdate两种 0nDeLete: 是在相应节点的Pod资源被删除后重建为新版本从而允许用户手动编排更新过程。RollingUpdate: 滚动更新工作逻辑和Deployment滚动更新类似; 1、DaemonSet的更新策略——RollingUpdate apiVersion: apps/v1 kind: DaemonSet metadata:name: node-exportsnamespace: default spec:minReadySeconds: 10 ## 更新时间默认是0秒revisionHistoryLimit: 20 ## 回滚次数updateStrategy: ## 更新策略rollingUpdate:type: RollingUpdate ##更新策略为RollingUpdaterollingUpdate: ## RollingUpdate的策略maxUnavailable: 1 ## 一次更新的pod数量selector:matchLabels:app: node-exportertemplate:metadata:labels:app: node-exporterspec:hostNetwork: true ##共享主机网络hostPID: true ##获取主机的PIDcontainers:- name: prometheus-node-exporterimage: prom/node-exporter:v0.18.1ports:- name: node-ex-httpcontainerPort: 9100hostPort: 9100##存活探测和就绪探测livenessProbe:tcpSocket:port: node-ex-http ##存活探测探测port的name其实就是探测端口9100initialDelaySeconds: 5 ##存活探测时间为5秒readinessProbe:httpGet:path: /metrics ## 就绪探针这是一个固定的接口port: node-ex-http ## 就绪探针探测port的name其实就是探测端口9100initialDelaySeconds: 5 ## 就绪探针时间为5秒安装默认的 RollingUpdate 策略node-exports-ds 资源将采用一次更新一个Pod对象待新建Pod的对象就绪后在更新下一个Pod对象直到全部完成。 2、DaemonSet的更新策略——OnDelete 1、将此前创建的node-expoter中的pod模板镜像更新为 prom/node-exporter:v1.3.1由于升级版本跨度过大无法确保升级过程中的稳定性我们就不得不使用 0nDeLete 策略来替换默认的RollingUpdate 策略 2.由于 0nDelete 并非自动完成升级它需要管理员手动删除Pod然后重新拉起新的Pod才能完成更新。 (对于升级有着先后顺序的软件 这种方法就非常的有用;) OnDelete的使用类型 kubectl explain daemonset.spec.updateStrategy.typeapiVersion: apps/v1 kind: DaemonSet metadata:name: node-exportsnamespace: default spec:minReadySeconds: 10 ## 更新时间默认是0秒revisionHistoryLimit: 20 ## 回滚次数updateStrategy: ## 更新策略rollingUpdate:type: OnDelete ##更新策略为OnDeletselector:matchLabels:app: node-exportertemplate:metadata:labels:app: node-exporterspec:hostNetwork: true ##共享主机网络hostPID: true ##获取主机的PIDcontainers:- name: prometheus-node-exporterimage: prom/node-exporter:v1.3.1ports:- name: node-ex-httpcontainerPort: 9100hostPort: 9100##存活探测和就绪探测livenessProbe:tcpSocket:port: node-ex-http ##存活探测探测port的name其实就是探测端口9100initialDelaySeconds: 5 ##存活探测时间为5秒readinessProbe:httpGet:path: /metrics ## 就绪探针这是一个固定的接口port: node-ex-http ## 就绪探针探测port的name其实就是探测端口9100initialDelaySeconds: 5 ## 就绪探针时间为5秒 发现应用yaml文件后image并没有发生变化 通过删除pod 重新创建会重新自动建立新的镜像的pod 相关命令 kubectl get pod -l appnode-exporter ## 根据标签进行相关pod的查看 kubectl get pod pod-ID -o yaml | grep image ## 查看pod的镜像 kubectl delete daemonset -l appnode-exporter ##根据标签进行pod删除
http://www.w-s-a.com/news/841193/

相关文章:

  • 菜鸟网站编程广州网站设计权威乐云践新
  • 网站做接口到app 价格大地资源免费视频观看
  • 怎么给钓鱼网站做防红网站建设相关的
  • 教育培训的网站建设湖南网站建设小公司
  • 福建南平网站建设创意交易平台网
  • 做直播网站要哪些技术内容营销理论
  • 价格划算的网站开发怎么找有赞做网站
  • 做网站店铺图片用什么软件网络营销方案格式
  • 做外贸要自己建网站吗有效的网络营销方式
  • 精通网站开发书籍做网站获取手机号码
  • 论坛做视频网站有哪些济南新站seo外包
  • 哪类型网站容易做冷水滩做微网站
  • 搭建企业网站流程保定徐水网站建设
  • 建设单位到江川区住房和城乡建设局网站伦敦 wordpress 设计
  • 响应式网站的服务麦德龙网站建设目标
  • 做国外单的网站叫什么海南省海口市网站建设
  • 杭州响应式网站案例wordpress5.2.2
  • 网站建设运营维护合同wordpress资源搜索插件
  • 国外网站流量查询东莞网站建设教程
  • 餐饮类网站建设达到的作用东莞工程建设交易中心网
  • 网站设计 知识产权湖北网站建设xiduyun
  • 猫咪网站模版下载中国风 古典 红色 网站源代码
  • 个人网站备案模板制作网站首页
  • 潍坊正规建设网站网站建设设计作业
  • 推荐一下网站谢谢辽宁住房城乡建设部官方网站
  • 网站文件大小英选 网站开发
  • 济南建网站哪家好wordpress编辑器排行
  • 在福州做搬家网站多少钱画册设计网站有哪些
  • 如何让别人浏览我做的网站哪些方法可以建设网站
  • 网站建设与管理网络推广的优点