container

作者: cdz620 | 来源:发表于2020-03-02 14:18 被阅读0次

container environment

container information

todo

cluster information

  • service environment(和docker注入环境的变量语法一致)
    • FOO_SERVICE_HOST=<the host the service is running on>
    • FOO_SERVICE_PORT=<the port the service is running on>

Container Hooks

提供信息给container管理生命周期的事件给container,相当于容器的event handler, 尽量保持轻量

PostStart

容器创建被发送,通知容器已经被创建,asynchronous execute, 不保证容器在运行ENTRYPOINT前运行。

PreStop

Hook delivery guarantees

  • at least once: hook handler可能被调用两次(in some cases if Kubelet restart), 需要hook implementer注意发送两次的情况

hook handler implementions

exec

在容器的环境内执行指定的命令

http

执行http请求

查看hook事件

kubectl describe pod <pod_name>

相关文章

网友评论

      本文标题:container

      本文链接:https://www.haomeiwen.com/subject/jfwrchtx.html