Steps involved in creating a pod in kubernetes

2019-08-02 06:54发布

How does Kubernetes create Pods?

I.e. what are the sequential steps involved in creating a Pod, is it implemented in Kubernetes?

Any code reference in Kubernetes repo would also be helpful.

标签: kubernetes
1条回答
戒情不戒烟
2楼-- · 2019-08-02 07:22

A Pod is described in a definition file, and ran as a set of Docker containers on a given host which is part of the Kubernetes cluster, much like docker-compose does, but with several differences.

Precisely, a Pod always contains multiple Docker containers, even though, only the containers defined by the user are usually visible through the API: A Pod has one container that is a placeholder generated by the Kubernetes API, that will hold the IP for the Pod (so that when a Pod is restarted, it's actually the client containers that are restarted, but the placeholder container remains and keeps the same IP, unlike in straight Docker or docker-compose, where recreating a composition or container changes the IP.)

How Pods are scheduled, created, started, restarted if needed, re-scheduled etc... it a much longer story and very broad question.

查看更多
登录 后发表回答