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

Issue with Agones Game Server Connectivity Using Cilium CNI #3942

Open
MuhanedYahya opened this issue Aug 12, 2024 · 8 comments
Open

Issue with Agones Game Server Connectivity Using Cilium CNI #3942

MuhanedYahya opened this issue Aug 12, 2024 · 8 comments
Labels
kind/bug These are bugs.

Comments

@MuhanedYahya
Copy link

MuhanedYahya commented Aug 12, 2024

Issue Summary:
I am experiencing issues connecting to a game server after deploying Agones in a Kubernetes cluster. The connection works correctly with Flannel as the CNI but fails when using Cilium.
Environment Details:

Kubernetes Version: v1.30
Cluster Setup: 3-node cluster using Vagrant on VirtualBox
Network Configuration: Nodes are configured with public_network, making them accessible on my local network.
CNI: Cilium
Load Balancer: MetalLB
Agones Version: 1.41.0

Problem Description:
After deploying Agones and a game server (using the sample game server from the Agones examples), I cannot establish a connection to the game server using the node IP and assigned port. When I switch the CNI from Cilium to Flannel, the connection works as expected. However, with Cilium, the connection fails.
Steps to Reproduce:

  1. Set up a 3-node Kubernetes cluster using Vagrant and VirtualBox.
  2. Configure the nodes to use public_network.
  3. Install Cilium as the CNI.
  4. Deploy MetalLB as the load balancer.
  5. Deploy Agones (v1.41.0).
  6. Deploy a sample game server from the Agones examples.
  7. Attempt to connect to the game server using the node IP and assigned port.

Observations:
The connection is successful when using Flannel as the CNI.
The issue arises only when using Cilium as the CNI.

Expected Behavior:
I expect to connect to the game server using the node IP and port when Cilium is configured as the CNI.
Actual Behavior:

The connection fails with Cilium as the CNI.
Additional Information:

No errors were observed in the logs of the game server or Agones components.
Cilium and MetalLB appear to be functioning correctly in other scenarios (e.g., standard Kubernetes service networking).

Request:
Could you please provide guidance on how to resolve this issue or suggest any specific configurations that might be causing this conflict between Agones and Cilium?

@MuhanedYahya MuhanedYahya added the kind/bug These are bugs. label Aug 12, 2024
@Syntax3rror404
Copy link

Looks like you dont use Cilium and still Metallb

@MuhanedYahya
Copy link
Author

Looks like you dont use Cilium and still Metallb

MetalLB is a load-balancing solution and not directly related to the CNI. I mentioned MetalLB because I'm using it for load balancing in this setup. I could have configured Cilium IPAM L2 for load balancing as well, but I decided not to pursue that option to keep the setup simpler. If there's any other recommendation for this configuration, I'm open to suggestions.

@Syntax3rror404
Copy link

Looks like you dont use Cilium and still Metallb

MetalLB is a load-balancing solution and not directly related to the CNI. I mentioned MetalLB because I'm using it for load balancing in this setup. I could have configured Cilium IPAM L2 for load balancing as well, but I decided not to pursue that option to keep the setup simpler. If there's any other recommendation for this configuration, I'm open to suggestions.

I also had many problems with Metallb. Try it with Cilium as L2 LB like Metallb or with BGP if you have BGP.
https://docs.cilium.io/en/stable/network/lb-ipam/

@MuhanedYahya
Copy link
Author

Looks like you dont use Cilium and still Metallb

MetalLB is a load-balancing solution and not directly related to the CNI. I mentioned MetalLB because I'm using it for load balancing in this setup. I could have configured Cilium IPAM L2 for load balancing as well, but I decided not to pursue that option to keep the setup simpler. If there's any other recommendation for this configuration, I'm open to suggestions.

I also had many problems with Metallb. Try it with Cilium as L2 LB like Metallb or with BGP if you have BGP. https://docs.cilium.io/en/stable/network/lb-ipam/

I am sure that this is not a load balancing problem. agones assigns externalP to game servers, so loadbalancing is not used in this case.

@Syntax3rror404
Copy link

Looks like you dont use Cilium and still Metallb

MetalLB is a load-balancing solution and not directly related to the CNI. I mentioned MetalLB because I'm using it for load balancing in this setup. I could have configured Cilium IPAM L2 for load balancing as well, but I decided not to pursue that option to keep the setup simpler. If there's any other recommendation for this configuration, I'm open to suggestions.

I also had many problems with Metallb. Try it with Cilium as L2 LB like Metallb or with BGP if you have BGP. https://docs.cilium.io/en/stable/network/lb-ipam/

I am sure that this is not a load balancing problem. agones assigns externalP to game servers, so loadbalancing is not used in this case.

Are you sure, because you also gets a kuberentes service with the kind loadbalancer with a external IP which a loadbalancer like metallb or cilium needs to announce

@MuhanedYahya
Copy link
Author

Looks like you dont use Cilium and still Metallb

MetalLB is a load-balancing solution and not directly related to the CNI. I mentioned MetalLB because I'm using it for load balancing in this setup. I could have configured Cilium IPAM L2 for load balancing as well, but I decided not to pursue that option to keep the setup simpler. If there's any other recommendation for this configuration, I'm open to suggestions.

I also had many problems with Metallb. Try it with Cilium as L2 LB like Metallb or with BGP if you have BGP. https://docs.cilium.io/en/stable/network/lb-ipam/

I am sure that this is not a load balancing problem. agones assigns externalP to game servers, so loadbalancing is not used in this case.

Are you sure, because you also gets a kuberentes service with the kind loadbalancer with a external IP which a loadbalancer like metallb or cilium needs to announce
agones allocates the IP of one of the nodes as externalIP to the game servers. Where exactly is the loadbalancer here?

@Syntax3rror404
Copy link

Its in you're description that you using metallb as loadbalancer so I think you're using metallb as loadbalancer?!

Kubernetes Version: v1.30
Cluster Setup: 3-node cluster using Vagrant on VirtualBox
Network Configuration: Nodes are configured with public_network, making them accessible on my local network.
CNI: Cilium
Load Balancer: MetalLB
Agones Version: 1.41.0

@MuhanedYahya
Copy link
Author

Yes, I was explaining my setup, but this is not important for agones because the game servers do not use load balancers.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/bug These are bugs.
Projects
None yet
Development

No branches or pull requests

2 participants