<p>I can configure <code>apiserver.service-node-port-range</code> extra-config with a port range like <code>10000-19000</code> but when I specify a comma separated list of ports like <code>17080,13306</code> minkube wouldn't start it will bootloop with below error</p>
<pre><code>💢  initialization failed, will try again: wait: /bin/bash -c &quot;sudo env PATH=/var/lib/minikube/binaries/v1.20.2:$PATH kubeadm init --config /var/tmp/minikube/kubeadm.yaml  --ignore-preflig
ht-errors=DirAvailable--etc-kubernetes-manifests,DirAvailable--var-lib-minikube,DirAvailable--var-lib-minikube-etcd,FileAvailable--etc-kubernetes-manifests-kube-scheduler.yaml,FileAvailabl
e--etc-kubernetes-manifests-kube-apiserver.yaml,FileAvailable--etc-kubernetes-manifests-kube-controller-manager.yaml,FileAvailable--etc-kubernetes-manifests-etcd.yaml,Port-10250,Swap,Mem,S
ystemVerification,FileContent--proc-sys-net-bridge-bridge-nf-call-iptables&quot;: Process exited with status 1
stdout:
[init] Using Kubernetes version: v1.20.2
[preflight] Running pre-flight checks
[preflight] The system verification failed. Printing the output from the verification:
KERNEL_VERSION: 5.10.26-1rodete1-amd64
DOCKER_VERSION: 20.10.5
OS: Linux
CGROUPS_CPU: enabled
CGROUPS_CPUSET: enabled
CGROUPS_DEVICES: enabled
CGROUPS_FREEZER: enabled
CGROUPS_MEMORY: enabled
CGROUPS_PIDS: enabled
CGROUPS_HUGETLB: enabled
[preflight] Pulling images required for setting up a Kubernetes cluster
.
.
.
[wait-control-plane] Waiting for the kubelet to boot up the control plane as static Pods from directory &quot;/etc/kubernetes/manifests&quot;. This can take up to 4m0s
[kubelet-check] Initial timeout of 40s passed.

        Unfortunately, an error has occurred:
                timed out waiting for the condition

        This error is likely caused by:
                - The kubelet is not running
                - The kubelet is unhealthy due to a misconfiguration of the node in some way (required cgroups disabled)

        If you are on a systemd-powered system, you can try to troubleshoot the error with the following commands:
                - 'systemctl status kubelet'
                - 'journalctl -xeu kubelet'

        Additionally, a control plane component may have crashed or exited when started by the container runtime.
        To troubleshoot, list all containers using your preferred container runtimes CLI.

        Here is one example how you may list all Kubernetes containers running in docker:
                - 'docker ps -a | grep kube | grep -v pause'
                Once you have found the failing container, you can inspect its logs with:
                - 'docker logs CONTAINERID'


stderr:

</code></pre>
<p>I checked the <a href="https://kubernetes.io/docs/reference/command-line-tools-reference/kube-apiserver/" rel="nofollow noreferrer">kube-apiserver</a> and takes only port range. Is comma comma separated list of ports supported in minikube?</p>
<p><code>--service-node-port-range &lt;a string in the form 'N1-N2'&gt;     Default: 30000-32767</code></p>

RandomQuests
<p>Posting this as community wiki, please feel free and provide more details and findings about this topic.</p>
<p>The only one place where we can find information about comma separated list of ports and port ranges is <em><a href="https://minikube.sigs.k8s.io/docs/handbook/accessing/#increasing-the-nodeport-range" rel="nofollow noreferrer">minikube documentation</a></em>:</p>
<blockquote>
<h3>Increasing the NodePort range</h3>
<p><strong>By default</strong>, minikube only <strong>exposes ports 30000-32767</strong>. If this does not work for &gt;you, you can adjust the range by using:</p>
<p><code>minikube start --extra-config=apiserver.service-node-port-range=1-65535</code></p>
<p><strong>This flag also accepts a comma separated list of ports and port ranges</strong>.</p>
</blockquote>
<p>On the other hand from the <em><a href="https://kubernetes.io/docs/reference/command-line-tools-reference/kube-apiserver/" rel="nofollow noreferrer">k8s documentation</a></em>:</p>
<blockquote>
<p><strong>--service-node-port-range &lt;a string in the form 'N1-N2'&gt;     Default: 30000-32767</strong></p>
</blockquote>
<p>I have tested this with k8s v 1.20 and comma separated list of ports also doesn't work for me. Kube-apiserver accept two approaches:</p>
<blockquote>
<p><strong>set parses a string of the form &quot;value&quot;, &quot;min-max&quot;, or &quot;min+offset&quot;, inclusive at both ends</strong></p>
</blockquote>
<pre><code>--service-node-port-range=30100-31000   # using &quot;min-max&quot; approach
--service-node-port-range=25000+100     # using &quot;min+offset&quot; approach (valid ranges will be 25000-25100)
</code></pre>
<hr />
<p>Additional resources:</p>
<ul>
<li><em><a href="https://github.com/kubernetes/kubernetes/blob/b6b4b974eb9f6ced70317e3da5426cdf9580ffb6/cmd/kube-apiserver/app/options/options.go#L235" rel="nofollow noreferrer">ServiceNodePortRange</a></em></li>
<li><em><a href="https://github.com/kubernetes/kubernetes/blob/b6b4b974eb9f6ced70317e3da5426cdf9580ffb6/staging/src/k8s.io/apimachinery/pkg/util/net/port_range.go#L25" rel="nofollow noreferrer">utilnet.PortRange</a></em></li>
</ul>
