Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

图解 Kubernetes Service #193

Open
cnych opened this issue Mar 5, 2021 · 3 comments
Open

图解 Kubernetes Service #193

cnych opened this issue Mar 5, 2021 · 3 comments

Comments

@cnych
Copy link
Owner

cnych commented Mar 5, 2021

https://www.qikqiak.com/post/visually-explained-k8s-service/

在 Kubernetes 中 Service 主要有4种不同的类型,其中的 ClusterIP 是最基础的。

上图解释了 Kubernetes 的 Service 的基本关系,当我们创建一个 NodePort 的 Service 时,它也会创建一个 ClusterIP,而如果你创建一个 LoadBalancer,它就会创建一个 NodePort,然后创建一个 ClusterIP

此外我们还需要明白 Service 是指向 pods 的,Service 不是直接指向 Deployments 或 ReplicaSets,而是直接使用 labels 标签指向 Pod,这种方式就提供了极大的灵活性,因为通过什么方式创建的 Pod 其实并不重要。接下来我们通过一个简单的例子开始,我们用不同的 Service 类型来逐步扩展,看看这些 Service 是如何建立的。

@willzhang
Copy link

@iouyang
Copy link

iouyang commented Dec 3, 2021

@Yuki-J1
Copy link

Yuki-J1 commented Dec 20, 2023

好文 内容明确 条理清晰 还有图

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants