在kubernetes中创建Pod涉及的步骤 [英] Steps involved in creating a pod in kubernetes

查看:105
本文介绍了在kubernetes中创建Pod涉及的步骤的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

Kubernetes如何创建Pod?

How does Kubernetes create Pods?

即在Kubernetes中实现了创建Pod的顺序步骤是什么?

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

Kubernetes存储库中的任何代码参考也将有所帮助.

Any code reference in Kubernetes repo would also be helpful.

推荐答案

在定义文件中描述了 Pod ,并在给定主机上作为一组Docker容器运行,该容器是容器中的一部分. Kubernetes集群很像docker-compose一样,但是有一些区别.

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.

准确地说,一个Pod总是包含多个Docker容器,尽管通常只有用户定义的容器才可以通过API看到:Pod具有一个由Kubernetes API生成的占位符的容器,该容器将保留IP对于Pod(因此,当Pod重新启动时,实际上是重新启动了客户端容器,但是占位符容器保留并保持相同的IP,这与直接Docker或docker-compose不同,在其中直接重新创建组合或容器会更改IP )

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.)

如何按需安排,创建,启动,重新启动Pod,如何重新安排Pod……这是一个更长的故事和一个非常广泛的问题.

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

这篇关于在kubernetes中创建Pod涉及的步骤的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆