<p>Due to the nested nature of kind I can't figure out what port to use or how to configure it so that I can just type localhost to get to it.</p>
<p>KIND YAML:</p>
<pre><code>kind: Cluster
apiVersion: kind.sigs.k8s.io/v1alpha3
nodes:
- role: control-plane
- role: worker
- role: worker
- role: worker
- role: worker
</code></pre>
<p>Also tried:</p>
<pre><code>kind: Cluster
apiVersion: kind.x-k8s.io/v1alpha4
nodes:
- role: control-plane
  extraPortMappings:
  - containerPort: 8080
    hostPort: 80
    protocol: TCP
- role: worker
- role: worker
- role: worker
- role: worker
</code></pre>
<p>Getting nodes up: <code>kind create cluster --config ~/go/kindconfigs/kind-config.yaml</code></p>
<p>JOB YAML:</p>
<pre><code># hello-kubernetes.yaml
apiVersion: v1
kind: Service
metadata:
  name: hello-kubernetes
spec:
  type: LoadBalancer
  ports:
  - port: 80
    targetPort: 8080
  selector:
    app: hello-kubernetes
---
apiVersion: apps/v1
kind: Deployment
metadata:
  name: hello-kubernetes
spec:
  replicas: 3
  selector:
    matchLabels:
      app: hello-kubernetes
  template:
    metadata:
      labels:
        app: hello-kubernetes
    spec:
      containers:
      - name: hello-kubernetes
        image: paulbouwer/hello-kubernetes:1.8
        ports:
        - containerPort: 8080
</code></pre>
<p>running it: <code>kubectl apply -f ~/go/kindconfigs/hello-kubernetes.yaml </code></p>

Mr.UNOwen
<p>Referring from <a href="https://kind.sigs.k8s.io/docs/user/quick-start/#mapping-ports-to-the-host-machine" rel="nofollow noreferrer">docs</a> you need to use <code>extraPortMappings</code> to allow the local host to make requests to the hello-kubernetes over port 80</p>
<pre><code>cat &lt;&lt;EOF | kind create cluster --config=-
kind: Cluster
apiVersion: kind.x-k8s.io/v1alpha4
nodes:
- role: control-plane
  extraPortMappings:
  - containerPort: 8080
    hostPort: 80
    protocol: TCP
  
EOF
</code></pre>
<p>The deployment needs to be changed as well</p>
<pre><code>apiVersion: apps/v1
kind: Deployment
metadata:
  name: hello-kubernetes
spec:
  replicas: 3
  selector:
    matchLabels:
      app: hello-kubernetes
  template:
    metadata:
      labels:
        app: hello-kubernetes
    spec:
      containers:
      - name: hello-kubernetes
        image: paulbouwer/hello-kubernetes:1.8
        securityContext:
          capabilities:
            drop:
              - ALL
            add:
              - NET_BIND_SERVICE
        ports:
        - containerPort: 8080
          hostPort: 80
</code></pre>
<p>With above configuration you can use <code>localhost:80</code> to access the hello-kubernetes application.</p>
<p>Note-1: Without above configuration you could access it via <code>NODEIP:NODEPORT</code></p>
<p>To get <code>NODEIP</code></p>
<p><code>kubectl get nodes -o wide</code></p>
<p>To get <code>NODEPORT</code></p>
<p><code>kubectl describe svc hello-kubernetes</code></p>
<p>Node-2: <code>LoadBalancer</code> type service only works on supported cloud environments. That's why in a kind cluster running locally on your system you need to use <code>NODEIP</code> and<code> NODEPORT</code> to access it.</p>
<p>Note-3: You can try <a href="https://mauilion.dev/posts/kind-metallb/" rel="nofollow noreferrer">metallb</a> with kind for making <code>LoadBalancer</code> type service work .This should solve <code>EXTERNAL-IP</code> pending issue.</p>
