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

11/25/2021

I just new in K8s. I try to self deploy k8s cloud in internal company server. And I have question how to I setup my K8s can allocation External IP for Service with Loabalancer. May you tell you how it work in GKE or EKS?

-- Duc Vo
amazon-eks
google-kubernetes-engine
kubernetes

2 Answers

11/30/2021

In GKE you can define services to expose or to make accessible the applications defined in the cluster. There are several kinds of services one of them is a LoadBalancer service, this can have an external IP address.

-- Jesus Huesca
Source: StackOverflow

11/27/2021

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

-- gohm'c
Source: StackOverflow