久久久噜噜噜久噜久久,国内精品久久久人妻中文字幕 ,久久人人爽av亚洲精品天堂,好大好湿好硬顶到了好爽视频,久久精品久久久久久久精品

您當(dāng)前的位置: 首頁(yè) >> 豫聞天下 > >> 內(nèi)容頁(yè)

每日資訊:Deployment滾動(dòng)更新策略Recreate

2023-04-30 11:17:42 來(lái)源:騰訊云


【資料圖】

Recreate策略

Recreate策略是另一種滾動(dòng)更新策略,它會(huì)先刪除舊的Pod,然后再創(chuàng)建新的Pod。在進(jìn)行滾動(dòng)更新時(shí),所有的Pod都會(huì)被同時(shí)停止,然后全部替換為新的Pod。Recreate策略的優(yōu)點(diǎn)是可以避免新舊Pod的共存問(wèn)題,但會(huì)在升級(jí)期間中斷服務(wù)。

下面是一個(gè)Recreate策略的示例:

apiVersion: apps/v1kind: Deploymentmetadata:  name: nginx-deployment  labels:    app: nginxspec:  replicas: 4  selector:    matchLabels:      app: nginx  template:    metadata:      labels:        app: nginx    spec:      containers:        - name: nginx          image: nginx:1.16          ports:            - containerPort: 80          livenessProbe:            httpGet:              path: /              port: 80            initialDelaySeconds: 10            periodSeconds: 5            timeoutSeconds: 2            failureThreshold: 3          readinessProbe:            httpGet:              path: /              port: 80            initialDelaySeconds: 10            periodSeconds: 5            timeoutSeconds: 2            failureThreshold: 3          lifecycle:            preStop:              exec:                command: ["/usr/sbin/nginx","-s","quit"]

這是一個(gè)創(chuàng)建了4個(gè)nginx Pod的Deployment對(duì)象,每個(gè)Pod中的nginx容器都有一個(gè)存活性探針和就緒性探針,并且在終止Pod之前執(zhí)行preStop鉤子,使用/usr/sbin/nginx -s quit命令關(guān)閉nginx服務(wù)器。這確保了nginx在關(guān)閉之前可以正常完成當(dāng)前正在處理的請(qǐng)求。

關(guān)鍵詞:
分享到:
x 廣告
x 廣告

  Copyright @ 2001-2013 www.jcbsd.cn All Rights Reserved 中國(guó)時(shí)尚網(wǎng) 版權(quán)所有

聯(lián)系方式:954 29 18 82 @qq.com

   粵ICP備18025786號(hào)  營(yíng)業(yè)執(zhí)照公示信息   未經(jīng)吉中國(guó)時(shí)尚網(wǎng)書面授權(quán),請(qǐng)勿建立鏡像,轉(zhuǎn)載請(qǐng)注明來(lái)源,違者依法必究

關(guān)于我們 | 聯(lián)系方式 | 版權(quán)聲明 | 招聘信息 | 友情鏈接 | 合作伙伴 |