惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

V
Vulnerabilities – Threatpost
U
Unit 42
F
Fortinet All Blogs
aimingoo的专栏
aimingoo的专栏
P
Proofpoint News Feed
F
Full Disclosure
月光博客
月光博客
Engineering at Meta
Engineering at Meta
博客园_首页
The Register - Security
The Register - Security
G
Google Developers Blog
The Cloudflare Blog
博客园 - Franky
K
Kaspersky official blog
A
Arctic Wolf
Scott Helme
Scott Helme
C
Cisco Blogs
Hugging Face - Blog
Hugging Face - Blog
C
Check Point Blog
NISL@THU
NISL@THU
AI
AI
D
DataBreaches.Net
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
Stack Overflow Blog
Stack Overflow Blog
Project Zero
Project Zero
The GitHub Blog
The GitHub Blog
H
Hackread – Cybersecurity News, Data Breaches, AI and More
量子位
Vercel News
Vercel News
T
Tor Project blog
P
Privacy International News Feed
D
Docker
I
Intezer
L
LangChain Blog
P
Proofpoint News Feed
Security Latest
Security Latest
C
CXSECURITY Database RSS Feed - CXSecurity.com
T
Threatpost
博客园 - 聂微东
AWS News Blog
AWS News Blog
Martin Fowler
Martin Fowler
P
Privacy & Cybersecurity Law Blog
V
V2EX
Last Week in AI
Last Week in AI
C
Cybersecurity and Infrastructure Security Agency CISA
The Hacker News
The Hacker News
T
Tenable Blog
Blog — PlanetScale
Blog — PlanetScale
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
T
Tailwind CSS Blog

博客园 - whitesky-root

windows python虚拟环境配置 git clone加速 Ubuntu 22.04 x86_64 cron不执行原因 k8s之认证文件失效,导致kubelet无法正常启动 supervisor 配置 安装 oop坑 jenkins打包报错: django jsonfield字段更新的坑 golang 效率工具库 gcc免编译安装配置 运维 chroot mysql lost connection to mysql server during query jdk镜像制作 curl 测试websocket请求 kubeadm reset 重置 VMware虚拟机无法联网 python 数据库连接池 Git找回add 后,未commit的文件(使用reset -hard 命令导致文件清除) set -e -x
k8s pod重启 deployment重启
whitesky-root · 2021-07-17 · via 博客园 - whitesky-root
1.15版本之后可通过kubectl rollout restart deployment -n 命令来实现滚动重启POD
该命令会先创建待用POD,待新POD运行成功后,再关闭原有POD。因此需要保证node节点数量大于POD数量,否则新POD无法正常启动。

当POD数量与node数量相同时,可使用先减小deployment规模的方法,先减小规模,再执行重启,待重启成功后再恢复deployment规模:
kubectl scale deployment pluto --replicas=2 -n test
kubectl rollout restart deployment pluto -n test
kubectl scale deployment pluto --replicas=3 -n test

方法1
kubectl scale deployment XXXX --replicas=0 -n {namespace}
kubectl scale deployment XXXX --replicas=1 -n {namespace}

方法2
kubectl delete pod {podname} -n {namespace}

方法3
kubectl get pod {podname} -n {namespace} -o yaml | kubectl replace --force -f -

方法4
Kubernetes 1.15开始才有

kubectl rollout restart deploy {your_deployment_name}

https://segmentfault.com/a/1190000020675199