简体   繁体   English

如何在 Kubernetes 中为具有类型 Loadbacer 的服务分配外部 ip Kubernetes 云,如 GKE、EKS、..

[英]How to Kubernetes Cloud like GKE , EKS,.. allocation external ip for Service with Type Loadbacer in Kubernetes?

I just new in K8s.我刚接触K8s。 I try to self deploy k8s cloud in internal company server.我尝试在公司内部服务器中自行部署 k8s 云。 And I have question how to I setup my K8s can allocation External IP for Service with Loabalancer.而且我有疑问如何设置我的 K8s 可以分配外部 IP 用于 Loabalancer 服务。 May you tell you how it work in GKE or EKS?你能告诉你它在 GKE 或 EKS 中是如何工作的吗?

Updated base on your comment.根据您的评论更新。

What I mean how to EKS or GKE behind the scenes allocation ip, what is a mechanism?

Here's the EKS version and here's the GKE version.这是EKS版本,这是GKE版本。 It's a complex thing, suggest you use these materials as the starting point before diving into technical details (which previous answer provided you the source).这是一件复杂的事情,建议您在深入研究技术细节之前使用这些材料作为起点(之前的答案为您提供了来源)。 In case you thought of on-premises k8s cluster, it depends on the CNI that you will use, a well known CNI is Calico .如果您想到本地 k8s 集群,这取决于您将使用的 CNI,众所周知的 CNI 是Calico

I try to self deploy k8s cloud in internal company server

For EKS, you can take a look at the source .对于 EKS,您可以查看源代码 If you want to try out installing k8s, you can start with kubeadm or kops .如果你想尝试安装 k8s,你可以从kubeadmkops开始。 For load balancer, you can checkout this source .对于负载均衡器,您可以签出此来源

In GKE you can define services to expose or to make accessible the applications defined in the cluster.在 GKE 中,您可以定义服务以公开或访问集群中定义的应用程序。 There are several kinds of services one of them is a LoadBalancer service , this can have an external IP address.有几种服务,其中一种是LoadBalancer 服务,它可以有一个外部 IP 地址。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM