当前位置:网站首页>重启Kubernetes Pod的几种方式
重启Kubernetes Pod的几种方式
2022-06-12 08:57:00 【叱咤少帅(少帅)】
前言
在使用 docker 的过程中,我们可以使用docker restart {container_id}来重启容器,但是在 kubernetes 中并没有重启命令(没有 kubectl restart {podname})
方法 1
有最新的 yaml 文件。
在有 yaml 文件的情况下可以直接使用 kubectl replace --force -f xxxx.yaml来强制替换Pod 的 API 对象,从而达到重启的目的。
方法 2
没有 yaml 文件,但是使用的是 Deployment 对象。
kubectl scale deployment esb-admin --replicas=0 -n {
namespace}
kubectl scale deployment esb-admin --replicas=1 -n {
namespace}
由于 Deployment 对象并不是直接操控的 Pod 对象,而是操控的 Rep
边栏推荐
- The newline character with in the string is converted to an array
- 正则校验用户名
- IP, DNS, domain name, URL, hosts
- Judge whether the object is empty
- Regular verification user name
- 第五章-[bx]和Loop指令
- mySql学习记录——二、mySql建表命令
- Flink CheckPoint : Exceeded checkpoint tolerable failure threshold
- RuntimeError:Input and parameter tensors are not at the same device, found input tensor at cuda:0 an
- [data storage] storage of floating point data in memory
猜你喜欢

【字符集八】char8_t、char16_t、char32_t、wchar、char

2022 melting welding and thermal cutting test questions and answers

利用nvm动态调整nodejs版本,解决因为node版本过高或过低导致项目无法运行和打包

Union selector

Background fixing effect

Popular understanding of time domain sampling and frequency domain continuation

Domain name mapping to specified IP

Regularization to limit the number of digits after the decimal point of an input number

MFS详解(四)——MFS管理服务器安装与配置

数据库不知道哪里出问题
随机推荐
Construction of memcached cache service under Linux:
2022 simulated examination platform operation of high voltage electrician work license question bank
Engineers learn music theory (I) try to understand music
Notes used by mqtt (combined with source code)
Handling abnormal data
API handling Android security distance
(node:22344) [DEP0123] DeprecationWarning: Setting the TLS ServerName to an IP address is not permit
(十五) TweenRunner
Graphic analysis of viewbox in SVG
Background location case 1
最少换乘次数
The classic dog contract of smart contract (I)
第三章 寄存器 (内存访问)
43 cas d'analyse du réseau neuronal MATLAB: chapitre 7 régression du réseau RBF - - réalisation de la régression fonctionnelle non linéaire
[character set 9] will GBK be garbled when copied to unicode?
Judge whether the object is empty
数据库不知道哪里出问题
[sklearn] lightgbm
第六章-包含多个段的程序
day5-x