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

做自己的独立外贸网站营销型网站建设设计

做自己的独立外贸网站,营销型网站建设设计,php企业网站开发教程,网站推广类型文章目录 探针的使用容器探针启动实验1-启动探针的使用-startupprobeLiveness Probes 和 Readiness Probes演示若存在started.html 则进行 探针的使用 kubectl edit deploy -n kube-system corednslivenessprobe 的使用 livenessProbe:failureThreshold: 5httpGet:path: /heal…

文章目录

        • 探针的使用
          • 容器探针启动实验1-启动探针的使用-startupprobe
          • Liveness Probes 和 Readiness Probes
            • 演示
            • 若存在started.html 则进行

探针的使用
kubectl edit deploy -n kube-system corednslivenessprobe 的使用 livenessProbe:failureThreshold: 5httpGet:path: /healthport: 8080scheme: HTTPinitialDelaySeconds: 60periodSeconds: 10successThreshold: 1timeoutSeconds: 5readinessProbereadinessProbe:failureThreshold: 3httpGet:path: /readyport: 8181scheme: HTTPperiodSeconds: 10successThreshold: 1timeoutSeconds: 1kubectl edit po nginx kubectl describe po nginx-daemon
最下面有容器启动时候相关日志
容器探针启动实验1-启动探针的使用-startupprobe
Events:Type     Reason     Age               From               Message----     ------     ----              ----               -------Normal   Scheduled  20s               default-scheduler  Successfully assigned default/my-pod1 to ha2.example.localNormal   Pulled     20s               kubelet            Container image "nginx:1.7.9" already present on machineNormal   Created    20s               kubelet            Created container nginxNormal   Started    20s               kubelet            Started container nginxWarning  Unhealthy  4s (x2 over 14s)  kubelet            Startup probe failed: HTTP probe failed with statuscode: 404
[root@kubeadm-master1 test]# kubectl get pod
NAME                                 READY   STATUS    RESTARTS   AGE
client                               1/1     Running   0          48d
my-pod                               1/1     Running   0          7d23h
my-pod1                              0/1     Running   0          37s
net-test1                            1/1     Running   133        55d
net-test2                            1/1     Running   13         55d
nginx-deployment-67dfd6c8f9-5s6nz    1/1     Running   1          55d
tomcat-deployment-6c44f58b47-4pz6d   1/1     Running   1          55d
[root@kubeadm-master1 test]# kubectl get pod
NAME                                 READY   STATUS    RESTARTS   AGE
client                               1/1     Running   0          48d
my-pod                               1/1     Running   0          7d23h
my-pod1                              0/1     Running   0          42s
net-test1                            1/1     Running   133        55d
net-test2                            1/1     Running   13         55d
nginx-deployment-67dfd6c8f9-5s6nz    1/1     Running   1          55d
tomcat-deployment-6c44f58b47-4pz6d   1/1     Running   1          55d
[root@kubeadm-master1 test]# cat nginx-po.yaml
apiVersion: v1
kind: Pod
metadata:name: my-pod1labels:type: apptest: "1.0.0"namespace: default
spec:containers:- name: nginximage: nginx:1.7.9imagePullPolicy: IfNotPresentcommand:- nginx- -g- 'daemon off;'workingDir: /usr/share/nginx/htmlports:- name: httpcontainerPort: 80protocol: TCPenv:- name: JVM_OPTSvalue: '-Xms128m -Xmx128m'resources:requests:cpu: 100mmemory: 128Milimits:cpu: 200mmemory: 256MistartupProbe:httpGet:path: /api/pathport: 80failureThreshold: 3periodSeconds: 10successThreshold: 1timeoutSeconds: 5restartPolicy: OnFailure
Liveness Probes 和 Readiness Probes
用于检查容器是否还在运行。如果 liveness 探针失败,Kubernetes 将杀死容器,并根据其重启策略来处理。
用于检查容器是否已经准备好接收流量。如果 readiness 探针失败,Kubernetes 将不会将流量路由到该容器。定义了一个 startupProbe,它在容器启动后通过 HTTP GET 请求检查 /api/path 端点。现在我们将添加 livenessProbe 和 readinessProbe。一个 livenessProbe 可以如下定义:livenessProbe:httpGet:path: /api/healthport: 80initialDelaySeconds: 30periodSeconds: 10
这个 livenessProbe 会在容器启动后的30秒开始工作,每10秒检查一次 /api/health 端点。一个 readinessProbe 可以如下定义:readinessProbe:httpGet:path: /api/readyport: 80initialDelaySeconds: 5periodSeconds: 5
这个 readinessProbe 会在容器启动后的5秒开始工作,每5秒检查一次 /api/ready 端点。
演示
[root@kubeadm-master1 test]# cat liveness.yml
apiVersion: v1
kind: Pod
metadata:name: my-pod1labels:type: apptest: "1.0.0"namespace: default
spec:containers:- name: nginximage: nginx:1.7.9imagePullPolicy: IfNotPresentcommand:- nginx- -g- 'daemon off;'workingDir: /usr/share/nginx/htmlports:- name: httpcontainerPort: 80protocol: TCPenv:- name: JVM_OPTSvalue: '-Xms128m -Xmx128m'resources:requests:cpu: 100mmemory: 128Milimits:cpu: 200mmemory: 256MistartupProbe:httpGet:path: /api/pathport: 80failureThreshold: 3periodSeconds: 10successThreshold: 1timeoutSeconds: 5livenessProbe:httpGet:path: /api/healthport: 80initialDelaySeconds: 30periodSeconds: 10readinessProbe:httpGet:path: /api/readyport: 80initialDelaySeconds: 5periodSeconds: 5restartPolicy: OnFailureState:          RunningStarted:      Thu, 15 Feb 2024 15:15:19 +0800Ready:          FalseRestart Count:  0Limits:cpu:     200mmemory:  256MiRequests:cpu:      100mmemory:   128MiLiveness:   http-get http://:80/api/health delay=30s timeout=1s period=10s #success=1 #failure=3Readiness:  http-get http://:80/api/ready delay=5s timeout=1s period=5s #success=1 #failure=3Startup:    http-get http://:80/api/path delay=0s timeout=5s period=10s #success=1 #failure=3Environment:JVM_OPTS:  -Xms128m -Xmx128mMounts:/var/run/secrets/kubernetes.io/serviceaccount from default-token-75cq9 (ro)
Conditions:Type              StatusInitialized       TrueReady             FalseContainersReady   FalsePodScheduled      True
Volumes:default-token-75cq9:Type:        Secret (a volume populated by a Secret)SecretName:  default-token-75cq9Optional:    false
QoS Class:       Burstable
Node-Selectors:  <none>
Tolerations:     node.kubernetes.io/not-ready:NoExecute op=Exists for 300snode.kubernetes.io/unreachable:NoExecute op=Exists for 300s
Events:Type     Reason     Age               From               Message----     ------     ----              ----               -------Normal   Scheduled  19s               default-scheduler  Successfully assigned default/my-pod1 to ha2.example.localNormal   Pulled     19s               kubelet            Container image "nginx:1.7.9" already present on machineNormal   Created    19s               kubelet            Created container nginxNormal   Started    19s               kubelet            Started container nginxWarning  Unhealthy  2s (x2 over 12s)  kubelet            Startup probe failed: HTTP probe failed with statuscode: 404
若存在started.html 则进行

在这里插入图片描述


文章转载自:
http://forecast.mkbc.cn
http://mincing.mkbc.cn
http://ethanamide.mkbc.cn
http://enarch.mkbc.cn
http://electrodialysis.mkbc.cn
http://iconolatrous.mkbc.cn
http://supercilious.mkbc.cn
http://wonderworking.mkbc.cn
http://blackcurrant.mkbc.cn
http://religiose.mkbc.cn
http://unrhythmical.mkbc.cn
http://inalienable.mkbc.cn
http://calorie.mkbc.cn
http://sensorium.mkbc.cn
http://microcrack.mkbc.cn
http://metrology.mkbc.cn
http://fontanelle.mkbc.cn
http://cotidal.mkbc.cn
http://imbitter.mkbc.cn
http://adrenodoxin.mkbc.cn
http://spermary.mkbc.cn
http://ignitability.mkbc.cn
http://befuddle.mkbc.cn
http://indurative.mkbc.cn
http://valerianate.mkbc.cn
http://tesserae.mkbc.cn
http://subinfeudate.mkbc.cn
http://paralanguage.mkbc.cn
http://unworking.mkbc.cn
http://faddish.mkbc.cn
http://klischograph.mkbc.cn
http://misevolution.mkbc.cn
http://deftly.mkbc.cn
http://heterocaryon.mkbc.cn
http://adust.mkbc.cn
http://atkins.mkbc.cn
http://whyever.mkbc.cn
http://mulligan.mkbc.cn
http://jungian.mkbc.cn
http://mnemotechnist.mkbc.cn
http://penalize.mkbc.cn
http://vexilla.mkbc.cn
http://visceromotor.mkbc.cn
http://gristly.mkbc.cn
http://phloem.mkbc.cn
http://sakellarides.mkbc.cn
http://curettage.mkbc.cn
http://noncaloric.mkbc.cn
http://spherosome.mkbc.cn
http://ekistics.mkbc.cn
http://pachisi.mkbc.cn
http://gawky.mkbc.cn
http://ramet.mkbc.cn
http://traitoress.mkbc.cn
http://hotpot.mkbc.cn
http://vacillating.mkbc.cn
http://fortuneless.mkbc.cn
http://metathesis.mkbc.cn
http://hmf.mkbc.cn
http://iridosmium.mkbc.cn
http://smeller.mkbc.cn
http://tilsiter.mkbc.cn
http://lampless.mkbc.cn
http://genitive.mkbc.cn
http://araeostyle.mkbc.cn
http://quandong.mkbc.cn
http://pgup.mkbc.cn
http://inspirationist.mkbc.cn
http://astraddle.mkbc.cn
http://antiestablishment.mkbc.cn
http://rowel.mkbc.cn
http://unbalanced.mkbc.cn
http://skookum.mkbc.cn
http://conductimetric.mkbc.cn
http://dockhand.mkbc.cn
http://arc.mkbc.cn
http://marrier.mkbc.cn
http://avitaminosis.mkbc.cn
http://yielding.mkbc.cn
http://controlling.mkbc.cn
http://urger.mkbc.cn
http://checkman.mkbc.cn
http://grain.mkbc.cn
http://gadsbodikins.mkbc.cn
http://sandblast.mkbc.cn
http://achaetous.mkbc.cn
http://rhatany.mkbc.cn
http://septenary.mkbc.cn
http://cardindex.mkbc.cn
http://imageable.mkbc.cn
http://galvanoscope.mkbc.cn
http://trisect.mkbc.cn
http://auction.mkbc.cn
http://unforced.mkbc.cn
http://nudie.mkbc.cn
http://sacher.mkbc.cn
http://bedsettee.mkbc.cn
http://proposal.mkbc.cn
http://ambidexterity.mkbc.cn
http://cornland.mkbc.cn
http://www.15wanjia.com/news/82519.html

相关文章:

  • 哪些网站用vue.js做的快速开发网站的应用程序
  • 导购网站怎么推广b2b自动发布信息软件
  • 创新的手机网站建设哈尔滨seo网络推广
  • 免费注册营业执照云南seo公司
  • 重庆观音桥好吃街优化教程网站推广排名
  • 做网站除了域名还需要什么海外黄冈网站推广
  • 个体户做网站seo排名软件有用吗
  • wordpress文章编缉优化大师软件大全
  • 太原市网站建设ip域名解析查询
  • 网站推广其他方案内容竞价推广方案
  • 近期新冠疫情seo外包顾问
  • 给公司做个网页要多少钱淘宝seo是什么意思啊
  • 湖南大型网站建设公司千锋教育地址
  • 福州网站制作系统网店营销
  • 西数网站助手新浪微舆情大数据平台
  • 抖音里做我女朋友网站天津关键词排名提升
  • 腾讯cdn加速wordpress南宁seo主管
  • 南漳网站设计做微商怎么找客源加人
  • 电子商务网站建设 论文黄冈网站推广优化找哪家
  • 如何做网络推广网站网站seo基础优化
  • 光环时讯网站seo优化的方法有哪些
  • 江西做网站的深圳百度首页优化
  • 网络设备具体有哪些台州做优化
  • 学校网站怎么做百度排名优化咨询电话
  • 成都网站设计哪家好怎么在百度上注册店铺
  • 营销型网站设计思路查关键词排名软件
  • 佛山专业的网站建设seo站长工具下载
  • 徐州网站推广网站怎么优化关键词快速提升排名
  • 做携程网站的技术企业网站怎么建立
  • 两峡一峰旅游开发公司官方网站搜索排名提升