<p>I'm using local Kubernetes cluster with kind. I try to use Ingress and follow the next instruction from official documentation:
<a href="https://kind.sigs.k8s.io/docs/user/ingress/#create-cluster" rel="nofollow noreferrer">https://kind.sigs.k8s.io/docs/user/ingress/#create-cluster</a></p>
<p>My cluster configuration:</p>
<pre><code>kind: Cluster
apiVersion: kind.x-k8s.io/v1alpha4
nodes:
- role: control-plane
  kubeadmConfigPatches:
  - |
    kind: InitConfiguration
    nodeRegistration:
      kubeletExtraArgs:
        node-labels: &quot;ingress-ready=true&quot;
  extraPortMappings:
  - containerPort: 80
    hostPort: 80
</code></pre>
<p>But looks like I cannot using port 80 on Windows:</p>
<pre><code>kind create cluster --config=.\kubernetes\kind-cluster.yaml
Creating cluster &quot;kind&quot; ...
 • Ensuring node image (kindest/node:v1.21.1) 🖼  ...
 ✓ Ensuring node image (kindest/node:v1.21.1) 🖼
 • Preparing nodes 📦   ...
 ✗ Preparing nodes 📦
ERROR: failed to create cluster: docker run error: command &quot;docker run --hostname kind-control-plane --name kind-control-plane --label io.x-k8s.kind.role=control-plane --privileged --security-opt seccomp=unconfined --security-opt apparmor=unconfined --tmpfs /tmp --tmpfs /run --volume /var --volume /lib/modules:/lib/modules:ro --detach --tty --label io.x-k8s.kind.cluster=kind --net kind --restart=on-failure:1 --init=false --publish=0.0.0.0:80:80/TCP --publish=127.0.0.1:55805:6443/TCP -e KUBECONFIG=/etc/kubernetes/admin.conf kindest/node:v1.21.1@sha256:69860bda5563ac81e3c0057d654b5253219618a22ec3a346306239bba8cfa1a6&quot; failed with error: exit status 125

Command Output: db8cabb573332b7f0466a0461c4b2e687350400f71bb2b04b98b337900180310
docker: Error response from daemon: Ports are not available: listen tcp 0.0.0.0:80: bind: An attempt was made to access a socket in a way forbidden by its access permissions.
</code></pre>
<p>So the main question: can I change that port to something another (30080)? And how to access services after that?</p>
<hr />
<p>Edit 1:
tried to use 30080 port and apply commands from Documentation link: Cluster starts, Ingress (using nginx) starts, but I can't access service:</p>
<pre><code>curl localhost/foo
curl : Not Found
HTTP Error 404. The requested resource is not found.

curl http://localhost:30080/foo
curl: Underlying connection closed: The connection was closed unexpectedly.
</code></pre>
<p>I suppose the reason is that Ingress use port 80 by default:</p>
<pre><code> kubectl get ingress
NAME              CLASS    HOSTS   ADDRESS     PORTS   AGE
example-ingress   &lt;none&gt;   *       localhost   80      5m46s
</code></pre>

Mikhail_Sam
<p>Somewhere on the Internet, I found a solution (unfortunately, I did not save the original link). The minimal implementation of the solution for my case is as follows:</p>
<pre><code>kind: Cluster
apiVersion: kind.x-k8s.io/v1alpha4
nodes:
- role: control-plane
  extraPortMappings:
  - containerPort: 80
    hostPort: 8080
    protocol: TCP
    listenAddress: 127.0.0.1
  - containerPort: 443
    hostPort: 9000
    protocol: TCP
    listenAddress: 127.0.0.1
</code></pre>
<p>This allows me to reach my services using:
<code>localhost:8080</code> or <code>127.0.0.1:8080</code>.
Suppose <code>443</code> port is for https, but I'm not using it at the current moment so can't check it's workability.</p>
