Skip to content

Commit f6d81e6

Browse files
docs: add instructions for Minikube with the Windows Docker driver (#3965)
Co-authored-by: igooch <igooch@google.com>
1 parent 0625ae5 commit f6d81e6

File tree

1 file changed

+29
-1
lines changed
  • site/content/en/docs/Installation/Creating Cluster

1 file changed

+29
-1
lines changed

site/content/en/docs/Installation/Creating Cluster/minikube.md

Lines changed: 29 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,8 @@ via Agones exposed ports.
5555
**Windows (amd64 - Windows 10 Enterprise or Pro)**
5656
* Hyper-V: You might need to refer to [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.
5757

58-
**Windows (amd64 - Windows 10 Home)**
58+
**Windows (amd64)**
59+
* Docker (default) with [this workaround](#minikube-start---ports-docker-only)
5960
* VirtualBox: You might need [this command](https://github.com/kubernetes/minikube/issues/3900) to disable hardware virtualization checks before starting the VM.
6061

6162
_If you have successfully tested with other platforms and drivers, please click "edit this page" in the top right hand
@@ -73,6 +74,33 @@ If you are unable to do so, the following workarounds are available, and may wor
7374
Rather than using the published IP of a `GameServer` to connect, run `minikube ip -p agones` to get the local IP for
7475
the minikube node, and connect to that address.
7576

77+
### minikube start \-\-ports (Docker only)
78+
79+
Since you cannot connect to minikube's private IP on Windows, a more reliable option is to publish the `GameServer`'s port range
80+
directly through Docker by making use of Minikube's `--ports` option. Unfortunately, exposing Agones' entire default port range
81+
(7000-8000) may cause Minikube to crash upon startup, so you will likely need to set a narrower port range as shown below.
82+
83+
This method requires a fresh Minikube cluster, so you may need to run `minikube delete -p agones` before continuing.
84+
85+
```bash
86+
minikube start --kubernetes-version v{{% minikube-example-cluster-version %}} -p agones --ports 7000-7100:7000-7100/udp
87+
```
88+
89+
When installing Agones on the new cluster (using [Helm]({{< relref "../Install Agones/helm.md" >}})), update the port range accordingly:
90+
91+
```bash
92+
helm install my-release --namespace agones-system --create-namespace \
93+
--set gameservers.minPort=7000,gameservers.maxPort=7100 agones/agones
94+
```
95+
96+
Once you have a `GameServer` running, try connecting to its port either on 127.0.0.1 or WSL's IP (`wsl hostname -I`).
97+
98+
{{< alert title="Note" color="info">}}
99+
The port range 7000-7100 will likely allow Minikube to start consistently, but you can narrow or widen this range
100+
to whatever works on your system. Make sure it is consistent between both the `minikube start` command shown above and
101+
the Helm configuration.
102+
{{< /alert >}}
103+
76104
### Create a service
77105

78106
This would only be for local development, but if none of the other workarounds work, creating a Service for the

0 commit comments

Comments
 (0)