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

涨薪技术|Kubernetes(k8s)之Pod生命周期(上)

我们一般将pod对象从创建至终这段时间范围成为pod的生命周期,它主要包含以下的过程:

  • pod创建过程

  • 运行初始化容器(init container)过程

  • 运行主容器(main container)

---->容器启动后钩子(post start)、容器终止前钩子(pre stop)

---->容器的存活性检测(liveness probe)、就绪性检测(readiness probe)

  • pod终止过程

图片

01Pod相位

首先在介绍 Pod 的生命周期之前,我们先了解下 Pod 的状态,因为 Pod 状态可以反映出当前我们的Pod 的具体状态信息,也是我们分析排错的一个必备的方式。

我们可以通过命令kubectl explain pod.status查看到

[root@master ~]# kubectl explain pod.statusKIND: PodVERSION: v1.....phase <string>The phase of a Pod is a simple, high-level summary of where the Pod is inits lifecycle. The conditions array, the reason and message fields, and theindividual container status arrays contain more detail about the pod'sstatus. There are five possible phase values:Pending: The pod has been accepted by the Kubernetes system, but one ormore of the container images has not been created. This includes timebefore being scheduled as well as time spent downloading images over thenetwork, which could take a while. Running: The pod has been bound to anod
http://www.xdnf.cn/news/16991.html

相关文章:

  • 山东省天地图API申请并加载到QGIS和ArcGIS Pro中
  • pyspark中的kafka的读和写案例操作
  • 面向对象编程基础:类的实例化与对象内存模型详解
  • Oracle 在线重定义
  • 【unitrix】 7.2 二进制位减法(bit_sub.rs)
  • MySQL偏门但基础的面试题集锦
  • MySql的两种安装方式
  • MySQL Router
  • VUE2 学习笔记17 路由
  • 华为OD机考2025C卷 - 最小矩阵宽度(Java Python JS C++ C )
  • 架构师面试(三十九):微服务重构单体应用
  • 【C++】语法基础篇
  • Javascript面试题及详细答案150道(046-060)
  • Flask全栈入门:打造区块链艺术品交易所
  • 风光储并网协同运行simulink仿真模型实现
  • transformer与神经网络
  • Azure DevOps — Kubernetes 上的自托管代理 — 第 5 部分
  • 进程间通信:管道与共享内存
  • Antlr学习笔记 02、使用antlr4实现简易版计算器
  • 【无标题】标准 I/O 中的一些函数,按功能分类说明其用法和特点
  • 【LeetCode刷题集】--排序(一)
  • clocking_cb驱动之坑
  • BackgroundTasks 如何巧妙驾驭多任务并发?
  • 测试-概念篇(3)
  • <PhotoShop><JavaScript><脚本>基于JavaScript,利用脚本实现PS软件批量替换图片,并转换为智能对象?
  • Linux 逻辑卷管理
  • 深入理解Spring中的循环依赖及解决方案
  • ssh连接VirtualBox中的Ubuntu24.04(win11、putty、NAT 模式)
  • 模型蒸馏(Distillation):原理、算法、应用
  • 每日任务day0804:小小勇者成长记之药剂师的小咪