googleforgames / agones

Dedicated Game Server Hosting and Scaling for Multiplayer Games on Kubernetes
https://agones.dev
Apache License 2.0
6.05k stars 801 forks source link

Failed to create game server #3609

Closed 100156994 closed 2 months ago

100156994 commented 8 months ago

I installed agones with helm chart on eks(CNI:calico). I got the error when creating game server as below:

What happened:

Error from server (InternalError): error when creating "https://raw.githubusercontent.com/googleforgames/agones/release-1.37.0/examples/simple-game-server/gameserver.yaml": Internal error occurred: failed calling webhook "mutations.agones.dev": failed to call webhook: Post "https://agones-controller-service.agones-system.svc:443/mutate?timeout=10s": Address is not allowed

my agones verison is 1.37.0

helm ls -n agones-system NAME NAMESPACE REVISION UPDATED STATUS CHART APP VERSION my-release agones-system 3 2024-01-23 16:13:46.511267 +0800 CST deployed agones-1.37.0 1.37.0

My kube version is as follows

Client Version: version.Info{Major:"1", Minor:"21", GitVersion:"v1.21.5", GitCommit:"aea7bbadd2fc0cd689de94a54e5b7b758869d691", GitTreeState:"clean", BuildDate:"2021-09-15T21:10:45Z", GoVersion:"go1.16.8", Compiler:"gc", Platform:"darwin/amd64"} Server Version: version.Info{Major:"1", Minor:"26+", GitVersion:"v1.26.12-eks-5e0fdde", GitCommit:"95c835ee1111774fe5e8b327187034d8136720a0", GitTreeState:"clean", BuildDate:"2024-01-02T20:34:50Z", GoVersion:"go1.20.12", Compiler:"gc", Platform:"linux/amd64"} WARNING: version difference between client (1.21) and server (1.26) exceeds the supported minor version skew of +/-1

kubectl get svc -n agones-system NAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGE agones-allocator LoadBalancer 192.168.197.223 443:30472/TCP 19h agones-allocator-metrics-service ClusterIP 192.168.140.78 8080/TCP 19h agones-controller-metrics-service ClusterIP 192.168.118.232 8080/TCP 19h agones-controller-service ClusterIP 192.168.130.147 443/TCP,8080/TCP 19h agones-extensions-metrics-service ClusterIP 192.168.225.128 8080/TCP 19h agones-ping-http-service LoadBalancer 192.168.95.5 80:32001/TCP 19h agones-ping-udp-service LoadBalancer 192.168.30.156 50000:31221/UDP 19h

We tried the solutions in issues #2750 and #1196, but it didn't work. In addition, setting the AWS security group to be fully open cannot solve this problem.Please help me fixing this error. Thanks.

markmandel commented 8 months ago

Unfortunately I can't test on EKS, but some things to look at:

kubectl get pods -n agones-system`

What pods are running or failing?

If you can see what's failing, then kubectl describe those pods and that should give you some ideas on what the issue is on EKS.

https://kubernetes.io/docs/tasks/debug/debug-application/debug-pods/ is a great guide to reference.

markmandel commented 8 months ago

@kylesomers tagging you in EKS related issues.

100156994 commented 8 months ago

不幸的是我无法在 EKS 上进行测试,但需要注意一些事项:

kubectl get pods -n agones-system`

哪些 Pod 正在运行或出现故障?

如果您可以看到失败的原因,那么kubectl describe这些 pod 应该可以让您了解 EKS 上的问题所在。

https://kubernetes.io/docs/tasks/debug/debug-application/debug-pods/是一个很好的参考指南

no pod failing,all agones pod is running, image but i solve it by change some network config , Perhaps the reason for this error is because of the vpc or cni configuration of AWS

ashutosji commented 8 months ago

Glad to know, you made it working!

Could you please add detailed information you made in network config? What was the issue in vpc or cni configuration of AWS. Future audience would be benefited from this.

100156994 commented 7 months ago

The cni plug-in of our aws eks cluster is calico, and we checked that the node security group is open. The way we solved the problem was to add configuration to the files controller.yaml and templates/extension-deployment.yaml templates/services/allocation.yaml The configuration is as follows: dnsPolicy: ClusterFirstWithHostNet hostNetwork: true

At the same time, in order to avoid control plane component port conflicts, set the replicas of values.yaml to 1.

aminalali8 commented 3 months ago

Sorry but where did you add those dnsPolicy and hostNetwork ? Are those values i can set from the helm chart?

zmerlynn commented 2 months ago

Sounds like this was resolved? Closing for now.