<p>So I followed this tutorial that explains how to building containerized microservices in Golang, Dockerize and Deploy to Kubernetes.</p>
<p><a href="https://www.youtube.com/watch?v=H6pF2Swqrko" rel="nofollow noreferrer">https://www.youtube.com/watch?v=H6pF2Swqrko</a></p>
<p>I got to the point that I can access my app via the minikube ip (mine is 192.168.59.100).
I set up kubernetes, I currently have 3 working pods but I can not open my golang app through kubernetes with the url that the kubectl shows me: &quot;192.168.59.100:31705...&quot;</p>
<p><a href="https://i.stack.imgur.com/Ef0Sp.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/Ef0Sp.png" alt="enter image description here" /></a></p>
<pre><code>                                                                   ^
                                                                   |
                                                                 here
</code></pre>
<p>I have a lead...
when i search &quot;https://192.168.59.100:8443/&quot; error 403 comes up:
<a href="https://i.stack.imgur.com/c96IC.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/c96IC.png" alt="enter image description here" /></a></p>
<p>Here is my deployment.yml:</p>
<pre><code>apiVersion: apps/v1
kind: Deployment
metadata:
  name: web-deployment
  labels:
    app: web
spec:
  replicas: 3
  selector:
    matchLabels:
      app: web
  template:
    metadata:
      labels:
        app: web
    spec:
      containers:
      - name: go-web-app
        image: go-app-ms:latest
        imagePullPolicy: IfNotPresent
        ports:
        - containerPort: 80
</code></pre>
<p>Here is my service.yml:</p>
<pre><code>apiVersion: v1
kind: Service
metadata:
  name: web-service
spec:
  type: NodePort
  selector:
    app.kubernetes.io/name: web
  ports:
    - port: 80
      targetPort: 80

</code></pre>

רועי פנחסי
<p>Your service's selector tries to match pods with label: <code>app.kubernetes.io/name: web</code>, but pods have <code>app: web</code> label. They do not match. The selector on service must match labels on pods. As you use <code>deployment</code> object, this means the same labels as in <code>spec.template.metadata.labels</code>.</p>
