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

涨薪技术|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.dtcms.com/a/316239.html

相关文章:

  • Deveco Studio 3.1.0.501 Windows版下载安装教程 - 华为开发者工具安装步骤详解
  • BenchmarkDotNet 性能基准测试
  • 统计鱼儿分布情况 Java
  • 三种灰狼算法求解无人机三维路径规划【MATLAB实现】
  • 2025国赛数学建模C题详细思路模型代码获取,备战国赛算法解析——层次分析法
  • MATLAB实现菲涅尔法全息成像仿真
  • Groovy学习篇章一之—— GDK 探秘:Groovy如何给Java对象“开外挂”,让String也能“跑命令”!
  • 磁悬浮转子的“静音术”:深度解析无接触抑制旋转幽灵的奥秘
  • 基于MCP的智能客服系统:知识库与工单系统深度集成
  • 英语中日期与时间缩写
  • 针对软件定义车载网络的动态服务导向机制
  • CoRL-2025 | 北大“如影随形”具身导航智能体!TrackVLA:复杂自然环境中的具身视觉跟踪
  • cJSON库应用
  • Vulnhuntr:用于识别远程可利用漏洞的开源工具
  • 文字识别在媒资系统的技术原理及应用剖析
  • 数据安全治理——解读数据安全治理与评估服务业务介绍【附全文阅读】
  • Book Shop(Dynamic Programming)
  • Direct12第六章
  • 【LeetCode 热题 100】347. 前 K 个高频元素——(解法一)排序截取
  • 防火墙的区域划分和流量控制
  • Qwen3技术之模型预训练
  • Redis Stream:高性能消息队列核心原理揭秘
  • 数据结构04 栈和队列
  • tensorRT配合triton部署模型
  • C语言的结构体与联合体
  • LOOP Finance:一场 Web3 共和国中的金融制度实验
  • Spring Boot 与 Ollama 集成部署私有LLM服务 的完整避坑指南,涵盖 环境配置、模型管理、性能优化 和 安全加固
  • 【数据结构入门】数组和链表的OJ题(2)
  • uv与conda环境冲突,无法使用uv环境,安装包之后出现ModuleNotFoundError: No module named ‘xxx‘等解决方法
  • SpringBoot中策略模式使用