-
Notifications
You must be signed in to change notification settings - Fork 365
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
Fix IP Assignment to Gateway in On-Prem Environment #5012
Comments
hey @sinkog
|
Specifically for metallb, you can also specify the apiVersion: gateway.envoyproxy.io/v1alpha1
kind: EnvoyProxy
metadata:
name: proxy
spec:
provider:
type: Kubernetes
kubernetes:
envoyService:
annotations:
metallb.io/loadBalancerIPs: x.x.x.x
---
apiVersion: gateway.networking.k8s.io/v1
kind: Gateway
metadata:
name: eg
spec:
gatewayClassName: eg
infrastructure:
parametersRef:
group: gateway.envoyproxy.io
kind: EnvoyProxy
name: proxy |
Thank you for the suggestions and detailed responses! The proposed solution works for configuring the Envoy Gateway, especially in handling the
Overall, while the current solution is functional, we recommend considering extending the API to better handle |
@sinkog this the annotation usage is directed by metalLB https://metallb.universe.tf/usage/, you can use Envoy Gateway's https://gateway.envoyproxy.io/docs/api/extension_types/#kubernetesservicespec to also set |
You're absolutely right. On the other hand, I step out of the Gateway object and need to create a child object whose definition, moreover, is not part of the Gateway API. The solution is good, but in your case, it doubles the necessary lines of code. <-> Okay, for an actual Gateway object, it's much less, but it still represents a log that needs maintenance. By the way, this issue has come up on your side multiple times in one way or another. It’s a fact that if I had found this in the documentation, the change request wouldn't have been made. But from this point on, there’s practically no solution that isn’t in a gray area. From a DevOps perspective: logically, this information is part of the Gateway because I want to assign an IP to it (and an externalIP can be assigned), not to a sub-object. Apologies for the term, but I have no involvement in your internal logic and connection points. From here, I’m not building the EnvoyProxy with your mechanisms, and I can only hope it works. Additionally, when building the infrastructure, I’m not combining just a few components, and if possible, I avoid complexity. If and when I need to use EnvoyProxy functionality, I’ll familiarize myself with its API and use it. So, the only problem with your proposal is reading through and understanding that x00 lines of API description, which shouldn’t even be necessary for a colleague who isn’t working on-prem. By the way, do you have annotations for Cilium, Calico, and other CNI implementations that use loadBalancerIP or other Layer 2 implementations? You have a few, and those are what I need to use. |
Issue Title: Fix IP Assignment to Gateway in On-Prem Environment
Description:
Our goal is to introduce Envoy Gateway in an on-prem Kubernetes environment using MetalLB and Cilium. Below is a summary of the issues and observations, particularly when trying to assign a fixed access IP to a service.
Observations:
Static IP Assignment to Gateway:
LoadBalancer
type service with the assigned IP appearing as theexternalIP
.Kubernetes and
externalIP
Handling:externalIP
is primarily handled by internal routing. If an external provider sets up a route to the IP, the routing works well, allowing external traffic to reach the service.MetalLB and
LoadBalancerIP
:LoadBalancer
type, and if aLoadBalancerIP
is assigned, it will pick an IP from the pool if the IP is available and assign it.Pool Settings and IP Assignment:
LoadBalancer
service will not receive an IP. This results in the service staying in apending
state until a suitable IP is found.externalIP
is assigned, thepending
state is overridden, but no automatic advertisement takes place, requiring manual route configuration to reach the desired IP.Multiple
externalIP
Issue:externalIP
s, which could be identical. This can create confusion regarding the service's availability, as multiple IPs are associated with the same service.Topic and Suggested Solution:
In an on-prem environment where fixed IP addresses are required, Kubernetes'
externalIP
andLoadBalancerIP
behave differently. TheexternalIP
often requires manual configuration in routers and the network infrastructure, whereas theLoadBalancerIP
can be dynamically managed by Kubernetes and MetalLB.externalIP
can be appropriately used if the IP address is advertised by the provider. In such configurations, IPs are usually managed and advertised by the cloud provider’s infrastructure.externalIP
may not be sufficient, as IP advertisement does not happen automatically, and manual routing configuration is necessary to direct traffic to the desired service IP.LoadBalancerIP
is more standardized in Kubernetes, and both MetalLB and Cilium rely on this for automatic advertisement. UsingLoadBalancerIP
ensures proper traffic routing and allows Kubernetes to handle scaling automatically.Request:
externalIP
andLoadBalancerIP
can be improved in on-prem Kubernetes environments to ensure fixed IP handling. Additionally, we request that MetalLB and Cilium properly handle the advertisement and routing of IPs, especially in scenarios where theexternalIP
is set.The text was updated successfully, but these errors were encountered: