From 331d3b59e52e456e048447356cd4961f43ebe2cf Mon Sep 17 00:00:00 2001 From: Mark Mandel Date: Wed, 13 Oct 2021 14:00:10 -0700 Subject: [PATCH 1/2] Minikube: more options for connectivity Minikube is a bit of a nightmare, since depending on your OS and your driver, you may or may not be able to connect to a UDP GameServer, with or without workarounds. These changes capture two things: 1. A few more workaround to try and some dead ends to avoid. 2. Which OS+driver combos are known to work. 3. That it may not actually be possible, in which case, it's time to try something else. --- .../Installation/Creating Cluster/minikube.md | 40 +++++++++++++++++-- 1 file changed, 37 insertions(+), 3 deletions(-) diff --git a/site/content/en/docs/Installation/Creating Cluster/minikube.md b/site/content/en/docs/Installation/Creating Cluster/minikube.md index 7a7f8201e2..e47b8cf1cf 100644 --- a/site/content/en/docs/Installation/Creating Cluster/minikube.md +++ b/site/content/en/docs/Installation/Creating Cluster/minikube.md @@ -32,9 +32,31 @@ may be required for your platform of choice. {{< alert title="Note" color="info">}} You may need to increase the `--cpu` or `--memory` values for your minikube instance, depending on what resources are -available on the host and/or how many GameServers you wish to run locally. +available on the host and/or how many GameServers you wish to run locally. + +Depending on your OS, you may also need to change the `--vm-driver` +([driver list](https://minikube.sigs.k8s.io/docs/drivers/)) to enable `GameServer` connectivity with or without +some workarounds listed below. {{< /alert >}} +### Known working drivers + +Other OS's and drivers may work, but at this stage have not been verified. + +**Linux** +* kvm2 + +**Mac** +* Docker (default) +* Hyperkit + +**Windows** +* hyper-v (might need [this comment](https://github.com/microsoft/WSL/issues/4288#issuecomment-652259640) + for WSL support) + +_If you have successfully tested with other platforms and drivers, please click "edit this page" in the top right hand +side and submit a pull request to let us know._ + ## Local connection workarounds Depending on your operating system and virtualization platform that you are using with Minikube, it may not be @@ -44,8 +66,8 @@ If you are unable to do so, the following workarounds are available, and may wor ### minikube ip -Rather than using the published IP of a `GameServer` to connect, run `minikube ip` to get the local IP for the -minikube node, and connect to that address. +Rather than using the published IP of a `GameServer` to connect, run `minikube ip -p agones` to get the local IP for +the minikube node, and connect to that address. ### Create a service @@ -77,6 +99,18 @@ Running `minikube service list -p agones` will show you the IP and port to conne To connect to a different `GameServer`, run `kubectl edit service agones-gameserver` and edit the `${GAMESERVER_NAME}` value to point to the new `GameServer` instance and/or the `${GAMESERVER_CONTAINER_PORT}` value as appropriate. +{{< alert title="Warning" color="warning">}} +`minikube tunnel` does not support UDP ([Github Issue](https://github.com/kubernetes/minikube/issues/12362)) on some +combination of OS platforms and drivers. +{{< /alert >}} + +### Use a different driver + +If you cannot connect through the `Service`or use other workarounds, you may want to try a different +[minikube driver](https://minikube.sigs.k8s.io/docs/drivers/), and if that doesn't work connection via UDP may not +be possible with minikube, and you may want to try either a +[different local Kubernetes tool](https://kubernetes.io/docs/tasks/tools/) or use a cloud hosted Kubernetes cluster. + ## Next Steps - Continue to [Install Agones]({{< relref "../Install Agones/_index.md" >}}). From a5a74228af3d9fd0c77a615e056e8ce5bdb57c0f Mon Sep 17 00:00:00 2001 From: Mark Mandel Date: Tue, 19 Oct 2021 14:13:17 -0700 Subject: [PATCH 2/2] Review updates. --- .../Installation/Creating Cluster/minikube.md | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/site/content/en/docs/Installation/Creating Cluster/minikube.md b/site/content/en/docs/Installation/Creating Cluster/minikube.md index e47b8cf1cf..aae2377e1a 100644 --- a/site/content/en/docs/Installation/Creating Cluster/minikube.md +++ b/site/content/en/docs/Installation/Creating Cluster/minikube.md @@ -34,14 +34,15 @@ may be required for your platform of choice. You may need to increase the `--cpu` or `--memory` values for your minikube instance, depending on what resources are available on the host and/or how many GameServers you wish to run locally. -Depending on your OS, you may also need to change the `--vm-driver` +Depending on your Operating System, you may also need to change the `--vm-driver` ([driver list](https://minikube.sigs.k8s.io/docs/drivers/)) to enable `GameServer` connectivity with or without some workarounds listed below. {{< /alert >}} ### Known working drivers -Other OS's and drivers may work, but at this stage have not been verified. +Other operating systems and drivers may work, but at this stage have not been verified to work with UDP connections +via Agones exposed ports. **Linux** * kvm2 @@ -51,8 +52,9 @@ Other OS's and drivers may work, but at this stage have not been verified. * Hyperkit **Windows** -* hyper-v (might need [this comment](https://github.com/microsoft/WSL/issues/4288#issuecomment-652259640) - for WSL support) +* hyper-v (might need + [this blog post](https://blog.thepolyglotprogrammer.com/setting-up-kubernetes-on-wsl-to-work-with-minikube-on-windows-10-90dac3c72fa1) + and/or [this comment](https://github.com/microsoft/WSL/issues/4288#issuecomment-652259640) for WSL support) _If you have successfully tested with other platforms and drivers, please click "edit this page" in the top right hand side and submit a pull request to let us know._ @@ -100,14 +102,15 @@ To connect to a different `GameServer`, run `kubectl edit service agones-gameser value to point to the new `GameServer` instance and/or the `${GAMESERVER_CONTAINER_PORT}` value as appropriate. {{< alert title="Warning" color="warning">}} -`minikube tunnel` does not support UDP ([Github Issue](https://github.com/kubernetes/minikube/issues/12362)) on some -combination of OS platforms and drivers. +`minikube tunnel` ([docs](https://minikube.sigs.k8s.io/docs/handbook/accessing/)) +does not support UDP ([Github Issue](https://github.com/kubernetes/minikube/issues/12362)) on some combination of +operating system, platforms and drivers, but is required when using the `Service` workaround. {{< /alert >}} ### Use a different driver If you cannot connect through the `Service`or use other workarounds, you may want to try a different -[minikube driver](https://minikube.sigs.k8s.io/docs/drivers/), and if that doesn't work connection via UDP may not +[minikube driver](https://minikube.sigs.k8s.io/docs/drivers/), and if that doesn't work, connection via UDP may not be possible with minikube, and you may want to try either a [different local Kubernetes tool](https://kubernetes.io/docs/tasks/tools/) or use a cloud hosted Kubernetes cluster.