Kubernetes---启动及退出动作
2024-10-06 15:38:58
apiVersion: v1
kind: Pod
metadata:
name: lifecycle-demo
spec:
containers:
- name:lifecycle-demo-container
image: nginx
1ifecycle:
poststart: #启动时运行
exec:
command: ["/bin/sh","-c","echo Hello from the postStart handler> /usr/share/message"]
prestop: #退出时运行
exec:
command: ["/bin/sh","-c","echo Hello from the poststop handler> /usr/share/message"]
最新文章
- iOS之在写一个iOS应用之前必须做的7件事(附相关资源)
- (原)String类两种实例化的区别
- 【转】【Asp.Net MVC】asp.net mvc Model验证总结及常用正则表达式
- leetcode-99 Recover_Binary_Search_Tree
- Cocos2d-x数据持久化-查询数据
- 之前C#代码的重新设计
- node.js url模块
- PS软件操作应用—文字特效
- Django_form
- 在Mac OS X中配置Apache + PHP + MySQL 很详细
- Python内置函数(28)——hash
- Spring中的AOP 专题
- DeleteFile 删除文件
- NuGet包和功能
- vue-amap | 基于 Vue 2.x 与高德的地图组件
- maven 插
- 关于Strategy和State设计模式
- Cause: java.sql.SQLException: Could not retrieve transation read-only status server
- MYSQL中可以实现类似IF判断的方法
- UNIX环境高级编程 第5章 标准I/O库