<h2><strong>Edited with new data after complete Kubernetes wipe-out.</strong></h2>
<p>Lately I am trying to do a test deploy of a Blazor server app on locally hosted Kubernetes instance running on docker desktop.</p>
<p>I managed to correctly spin up the app in a container, migrations were applied etc, logs are telling me that the app is running and waiting.</p>
<p><strong>Steps taken after resetting Kubernetes using <code>Reset Kubernetes Kluster</code> in Docker Desktop:</strong></p>
<ul>
<li><p>Modified <code>hosts</code> file to include <code>127.0.0.1 scp.com</code></p>
</li>
<li><p>Added secret containing key to mssql</p>
</li>
<li><p>Installed Ngnix controller using <code>kubectl apply -f https://raw.githubusercontent.com/kubernetes/ingress-nginx/controller-v1.1.0/deploy/static/provider/cloud/deploy.yaml</code></p>
</li>
<li><p>Applied local volume claim - <code>local-pvc.yaml</code></p>
<pre class="lang-yaml prettyprint-override"><code>apiVersion: v1
kind: PersistentVolumeClaim
metadata:
    name: mssql-claim
spec:
    accessModes:
        - ReadWriteMany
    resources:
        requests:
            storage: 250Mi
</code></pre>
</li>
<li><p>Applied mssql instance and cluster ip - <code>mssql-scanapp-depl.yaml</code></p>
<pre class="lang-yaml prettyprint-override"><code>apiVersion: apps/v1
kind: Deployment
metadata:
    name: mssql-depl
spec:
    replicas: 1
    selector:
        matchLabels:
            app: mssql
    template:
        metadata:
            labels:
                app: mssql
        spec:
            containers:
                - name: mssql
                  image: mcr.microsoft.com/mssql/server:2019-latest
                  ports:
                      - containerPort: 1433
                  env:
                      - name: MSSQL_PID
                        value: &quot;Express&quot;
                      - name: ACCEPT_EULA
                        value: &quot;Y&quot;
                      - name: SA_PASSWORD
                        valueFrom:
                            secretKeyRef:
                                name: mssql
                                key: SA_PASSWORD
                  volumeMounts:
                      - mountPath: /var/opt/mssql/data
                        name: mssqldb
            volumes:
                - name: mssqldb
                  persistentVolumeClaim:
                      claimName: mssql-claim
---
apiVersion: v1
kind: Service
metadata:
    name: mssql-clusterip-srv
spec:
    type: ClusterIP
    selector:
        app: mssql
    ports:
        - name: mssql
          protocol: TCP
          port: 1433
          targetPort: 1433
---
apiVersion: v1
kind: Service
metadata:
    name: mssql-loadbalancer
spec:
    type: LoadBalancer
    selector:
        app: mssql
    ports:        
        - protocol: TCP
          port: 1433
          targetPort: 1433
</code></pre>
</li>
<li><p>Applied Blazor application and cluster ip - <code>scanapp-depl.yaml</code>:</p>
<pre class="lang-yaml prettyprint-override"><code>apiVersion: apps/v1
kind: Deployment
metadata:
    name: scanapp-depl
spec:
    replicas: 1
    selector:
        matchLabels:
            app: scanapp
    template:
        metadata:
            labels:
                app: scanapp
        spec:
            containers:
                - name: scanapp
                  image: scanapp:1.0
---
apiVersion: v1
kind: Service
metadata:
    name: scanapp-clusterip-srv
spec:
    type: ClusterIP
    selector:
        app: scanapp
    ports:
        - name: ui
          protocol: TCP
          port: 8080
          targetPort: 80
        - name: ui2
          protocol: TCP
          port: 8081
          targetPort: 443
        - name: scanapp0
          protocol: TCP
          port: 5000
          targetPort: 5000
        - name: scanapp1
          protocol: TCP
          port: 5001
          targetPort: 5001
        - name: scanapp5
          protocol: TCP
          port: 5005
          targetPort: 5005
</code></pre>
</li>
<li><p>Applied Ingress - <code>ingress-srv.yaml</code>:</p>
<pre class="lang-yaml prettyprint-override"><code>apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
  name: ingress-srv
  annotations:
    nginx.ingress.kubernetes.io/rewrite-target: /    
    nginx.ingress.kubernetes.io/affinity: &quot;cookie&quot;
    nginx.ingress.kubernetes.io/session-cookie-name: &quot;affinity&quot;
    nginx.ingress.kubernetes.io/session-cookie-expires: &quot;14400&quot;
    nginx.ingress.kubernetes.io/session-cookie-max-age: &quot;14400&quot;
spec:
  ingressClassName: nginx
  rules:
      - host: scp.com
        http:
            paths:
            - path: /
              pathType: Prefix
              backend:
                service:
                  name: scanapp-clusterip-srv
                  port:
                    number: 8080
</code></pre>
</li>
</ul>
<p>After all of this, Blazor app starts good, connects to mssql instance, seeds database and awaits for clients. Logs are as follows:</p>
<blockquote>
<p>[15:18:53 INF] Starting up...<br />
[15:18:53 WRN] Storing keys in a directory '/root/.aspnet
/DataProtection-Keys' that may not be persisted outside of the container. Protected data will be unavailable when container is destroyed.<br />
[15:18:55 INF] AuthorizationPolicy Configuration started ...<br />
[15:18:55 INF] Policy 'LocationMustBeSady' was configured \successfully.
[15:18:55 INF] AuthorizationPolicy Configuration completed.
[15:18:55 INF] Now listening on: http://[::]:80
[15:18:55 INF] Application started. Press Ctrl+C to shut down.
[15:18:55 INF] Hosting environment: docker
[15:18:55 INF] Content root path: /app</p>
</blockquote>
<h1><strong>As stated in the beginning - I cannot, for the love of all, get into my blazor app from browser - I tried:</strong></h1>
<ul>
<li>scp.com</li>
<li>scp.com:8080</li>
<li>scp.com:5000</li>
<li>scp.com:5001</li>
<li>scp.com:5005</li>
</ul>
<p><strong>Also, <code>kubectl get ingress</code> now does not display ADDRESS value  like before and <code>kubectl get services</code> now says <em>pending</em> for <code>mssql-loadbalancer</code> and <code>ingress-nginx-controller</code> EXTERNAL-IP - detailed logs at the end of this post</strong></p>
<p>Nothing seems to work, so there must be something wrong with my config files and I have no idea what could it be.
Also, note that there is no <code>NodePort</code> configured this time.</p>
<p>In addition, Dockerfile for Blazor app:</p>
<pre class="lang-yaml prettyprint-override"><code>    # https://hub.docker.com/_/microsoft-dotnet
    FROM mcr.microsoft.com/dotnet/sdk:5.0 AS build
    WORKDIR /source
    EXPOSE 5000
    EXPOSE 5001
    EXPOSE 5005
    EXPOSE 80
    EXPOSE 443
    
    LABEL name=&quot;ScanApp&quot;
    
    # copy csproj and restore as distinct layers
    COPY ScanApp/*.csproj ScanApp/
    COPY ScanApp.Application/*.csproj ScanApp.Application/
    COPY ScanApp.Common/*.csproj ScanApp.Common/
    COPY ScanApp.Domain/*.csproj ScanApp.Domain/
    COPY ScanApp.Infrastructure/*.csproj ScanApp.Infrastructure/
    COPY ScanApp.Tests/*.csproj ScanApp.Tests/
    
    Run ln -sf /usr/share/zoneinfo/posix/Europe/Warsaw /etc/localtime
    RUN dotnet restore ScanApp/ScanApp.csproj
    
    # copy and build app and libraries
    COPY ScanApp/ ScanApp/
    COPY ScanApp.Application/ ScanApp.Application/
    COPY ScanApp.Common/ ScanApp.Common/
    COPY ScanApp.Domain/ ScanApp.Domain/
    COPY ScanApp.Infrastructure/ ScanApp.Infrastructure/
    COPY ScanApp.Tests/ ScanApp.Tests/
    WORKDIR /source/ScanApp
    RUN dotnet build -c release --no-restore
    
    # test stage -- exposes optional entrypoint
    # target entrypoint with: docker build --target test
    FROM build AS test
    WORKDIR /source/ScanApp.Tests
    COPY tests/ .
    ENTRYPOINT [&quot;dotnet&quot;, &quot;test&quot;, &quot;--logger:trx&quot;]
    
    FROM build AS publish
    RUN dotnet publish -c release --no-build -o /app
    
    # final stage/image
    FROM mcr.microsoft.com/dotnet/aspnet:5.0
    WORKDIR /app
    COPY --from=publish /app .
    ENV ASPNETCORE_ENVIRONMENT=&quot;docker&quot;
    ENTRYPOINT [&quot;dotnet&quot;, &quot;ScanApp.dll&quot;]
</code></pre>
<h2><strong>kubectl outputs</strong></h2>
<p><code>kubectl get ingress</code> output:</p>
<div class="s-table-container">
<table class="s-table">
<thead>
<tr>
<th>NAME</th>
<th>CLASS</th>
<th>HOSTS</th>
<th>ADDRESS</th>
<th>PORTS</th>
<th>AGE</th>
</tr>
</thead>
<tbody>
<tr>
<td>ingress-srv</td>
<td>nginx</td>
<td>scp.com</td>
<td></td>
<td>80</td>
<td>35m</td>
</tr>
</tbody>
</table>
</div>
<p><br />
<br />
<code>kubectl get pods --all-namespaces</code> output:</p>
<div class="s-table-container">
<table class="s-table">
<thead>
<tr>
<th style="text-align: center;"><strong>NAME</strong></th>
<th style="text-align: center;"><strong>READY</strong></th>
<th style="text-align: center;"><strong>STATUS</strong></th>
<th style="text-align: center;"><strong>RESTARTS</strong></th>
<th style="text-align: center;"><strong>AGE</strong></th>
</tr>
</thead>
<tbody>
<tr>
<td style="text-align: center;">default</td>
<td style="text-align: center;">mssql-depl-7f46b5c696-7hhbr</td>
<td style="text-align: center;">1/1</td>
<td style="text-align: center;">Running</td>
<td style="text-align: center;">0</td>
</tr>
<tr>
<td style="text-align: center;">default</td>
<td style="text-align: center;">scanapp-depl-76f56bc6df-4jcq4</td>
<td style="text-align: center;">1/1</td>
<td style="text-align: center;">Running</td>
<td style="text-align: center;">0</td>
</tr>
<tr>
<td style="text-align: center;">ingress-nginx</td>
<td style="text-align: center;">ingress-nginx-admission-create-qdnck</td>
<td style="text-align: center;">0/1</td>
<td style="text-align: center;">Completed</td>
<td style="text-align: center;">0</td>
</tr>
<tr>
<td style="text-align: center;">ingress-nginx</td>
<td style="text-align: center;">ingress-nginx-admission-patch-chxqn</td>
<td style="text-align: center;">0/1</td>
<td style="text-align: center;">Completed</td>
<td style="text-align: center;">1</td>
</tr>
<tr>
<td style="text-align: center;">ingress-nginx</td>
<td style="text-align: center;">ingress-nginx-controller-54bfb9bb-f6gsf</td>
<td style="text-align: center;">1/1</td>
<td style="text-align: center;">Running</td>
<td style="text-align: center;">0</td>
</tr>
<tr>
<td style="text-align: center;">kube-system</td>
<td style="text-align: center;">coredns-558bd4d5db-mr8p7</td>
<td style="text-align: center;">1/1</td>
<td style="text-align: center;">Running</td>
<td style="text-align: center;">0</td>
</tr>
<tr>
<td style="text-align: center;">kube-system</td>
<td style="text-align: center;">coredns-558bd4d5db-rdw2d</td>
<td style="text-align: center;">1/1</td>
<td style="text-align: center;">Running</td>
<td style="text-align: center;">0</td>
</tr>
<tr>
<td style="text-align: center;">kube-system</td>
<td style="text-align: center;">etcd-docker-desktop</td>
<td style="text-align: center;">1/1</td>
<td style="text-align: center;">Running</td>
<td style="text-align: center;">0</td>
</tr>
<tr>
<td style="text-align: center;">kube-system</td>
<td style="text-align: center;">kube-apiserver-docker-desktop</td>
<td style="text-align: center;">1/1</td>
<td style="text-align: center;">Running</td>
<td style="text-align: center;">0</td>
</tr>
<tr>
<td style="text-align: center;">kube-system</td>
<td style="text-align: center;">kube-controller-manager-docker-desktop</td>
<td style="text-align: center;">1/1</td>
<td style="text-align: center;">Running</td>
<td style="text-align: center;">0</td>
</tr>
<tr>
<td style="text-align: center;">kube-system</td>
<td style="text-align: center;">kube-proxy-pws8f</td>
<td style="text-align: center;">1/1</td>
<td style="text-align: center;">Running</td>
<td style="text-align: center;">0</td>
</tr>
<tr>
<td style="text-align: center;">kube-system</td>
<td style="text-align: center;">kube-scheduler-docker-desktop</td>
<td style="text-align: center;">1/1</td>
<td style="text-align: center;">Running</td>
<td style="text-align: center;">0</td>
</tr>
<tr>
<td style="text-align: center;">kube-system</td>
<td style="text-align: center;">storage-provisioner</td>
<td style="text-align: center;">1/1</td>
<td style="text-align: center;">Running</td>
<td style="text-align: center;">0</td>
</tr>
<tr>
<td style="text-align: center;">kube-system</td>
<td style="text-align: center;">vpnkit-controller</td>
<td style="text-align: center;">1/1</td>
<td style="text-align: center;">Running</td>
<td style="text-align: center;">6</td>
</tr>
</tbody>
</table>
</div>
<p><br />
<br />
<code>kubectl get deployments --all-namespaces</code> output</p>
<div class="s-table-container">
<table class="s-table">
<thead>
<tr>
<th style="text-align: center;"><strong>NAME</strong></th>
<th style="text-align: center;"><strong>READY</strong></th>
<th style="text-align: center;"><strong>UP-TO-DATE</strong></th>
<th style="text-align: center;"><strong>AVAILABLE</strong></th>
<th style="text-align: center;"><strong>AGE</strong></th>
</tr>
</thead>
<tbody>
<tr>
<td style="text-align: center;">default</td>
<td style="text-align: center;">mssql-depl</td>
<td style="text-align: center;">1/1</td>
<td style="text-align: center;">1</td>
<td style="text-align: center;">1</td>
</tr>
<tr>
<td style="text-align: center;">default</td>
<td style="text-align: center;">scanapp-depl</td>
<td style="text-align: center;">1/1</td>
<td style="text-align: center;">1</td>
<td style="text-align: center;">1</td>
</tr>
<tr>
<td style="text-align: center;">ingress-nginx</td>
<td style="text-align: center;">ingress-nginx-controller</td>
<td style="text-align: center;">1/1</td>
<td style="text-align: center;">1</td>
<td style="text-align: center;">1</td>
</tr>
<tr>
<td style="text-align: center;">kube-system</td>
<td style="text-align: center;">coredns</td>
<td style="text-align: center;">2/2</td>
<td style="text-align: center;">2</td>
<td style="text-align: center;">2</td>
</tr>
</tbody>
</table>
</div>
<p><br />
<br />
<code>kubectl get services --all-namespaces</code> output:</p>
<div class="s-table-container">
<table class="s-table">
<thead>
<tr>
<th style="text-align: center;"><strong>NAME</strong></th>
<th style="text-align: center;"><strong>TYPE</strong></th>
<th style="text-align: center;"><strong>CLUSTER-IP</strong></th>
<th style="text-align: center;"><strong>EXTERNAL-IP</strong></th>
<th style="text-align: center;"><strong>PORT(S)</strong></th>
<th style="text-align: center;"><strong>AGE</strong></th>
</tr>
</thead>
<tbody>
<tr>
<td style="text-align: center;">default</td>
<td style="text-align: center;">kubernetes</td>
<td style="text-align: center;">ClusterIP</td>
<td style="text-align: center;">10.96.0.1</td>
<td style="text-align: center;">none</td>
<td style="text-align: center;">443/TCP</td>
</tr>
<tr>
<td style="text-align: center;">default</td>
<td style="text-align: center;">mssql-clusterip-srv</td>
<td style="text-align: center;">ClusterIP</td>
<td style="text-align: center;">10.97.96.94</td>
<td style="text-align: center;">none</td>
<td style="text-align: center;">1433/TCP</td>
</tr>
<tr>
<td style="text-align: center;">default</td>
<td style="text-align: center;">mssql-loadbalancer</td>
<td style="text-align: center;">LoadBalancer</td>
<td style="text-align: center;">10.107.235.49</td>
<td style="text-align: center;">pending</td>
<td style="text-align: center;">1433:30149/TCP</td>
</tr>
<tr>
<td style="text-align: center;">default</td>
<td style="text-align: center;">scanapp-clusterip-srv</td>
<td style="text-align: center;">ClusterIP</td>
<td style="text-align: center;">10.109.116.183</td>
<td style="text-align: center;">none</td>
<td style="text-align: center;">8080/TCP,8081/TCP,5000/TCP,5001/TCP,5005/TCP</td>
</tr>
<tr>
<td style="text-align: center;">ingress-nginx</td>
<td style="text-align: center;">ingress-nginx-controller</td>
<td style="text-align: center;">LoadBalancer</td>
<td style="text-align: center;">10.103.89.226</td>
<td style="text-align: center;">pending</td>
<td style="text-align: center;">80:30562/TCP,443:31733/TCP</td>
</tr>
<tr>
<td style="text-align: center;">ingress-nginx</td>
<td style="text-align: center;">ingress-nginx-controller-admission</td>
<td style="text-align: center;">ClusterIP</td>
<td style="text-align: center;">10.111.235.243</td>
<td style="text-align: center;">none</td>
<td style="text-align: center;">443/TCP</td>
</tr>
<tr>
<td style="text-align: center;">kube-system</td>
<td style="text-align: center;">kube-dns</td>
<td style="text-align: center;">ClusterIP</td>
<td style="text-align: center;">10.96.0.10</td>
<td style="text-align: center;">none</td>
<td style="text-align: center;">53/UDP,53/TCP,9153/TCP</td>
</tr>
</tbody>
</table>
</div><h2>Ingress logs:</h2>
<blockquote>
<hr />
<p>NGINX Ingress controller</p>
<p>Release:       v1.1.0</p>
<p>Build:         cacbee86b6ccc45bde8ffc184521bed3022e7dee</p>
<p>Repository:    <a href="https://github.com/kubernetes/ingress-nginx" rel="nofollow noreferrer">https://github.com/kubernetes/ingress-nginx</a></p>
<p>nginx version: nginx/1.19.9</p>
<hr />
<p>W1129 15:00:51.705331       8 client_config.go:615] Neither
--kubeconfig nor --master was specified.  Using the inClusterConfig.  This might not work.</p>
<p>I1129 15:00:51.705452       8 main.go:223] &quot;Creating API client&quot;
host=&quot;https://10.96.0.1:443&quot;</p>
<p>I1129 15:00:51.721575       8 main.go:267] &quot;Running in Kubernetes
cluster&quot; major=&quot;1&quot; minor=&quot;21&quot; git=&quot;v1.21.5&quot; state=&quot;clean&quot;
commit=&quot;aea7bbadd2fc0cd689de94a54e5b7b758869d691&quot;
platform=&quot;linux/amd64&quot;</p>
<p>I1129 15:00:51.872964       8 main.go:104] &quot;SSL fake certificate
created&quot;
file=&quot;/etc/ingress-controller/ssl/default-fake-certificate.pem&quot;</p>
<p>I1129 15:00:51.890273       8 ssl.go:531] &quot;loading tls certificate&quot;
path=&quot;/usr/local/certificates/cert&quot; key=&quot;/usr/local/certificates/key&quot;</p>
<p>I1129 15:00:51.910104       8 nginx.go:255] &quot;Starting NGINX Ingress
controller&quot;</p>
<p>I1129 15:00:51.920821       8 event.go:282]
Event(v1.ObjectReference{Kind:&quot;ConfigMap&quot;, Namespace:&quot;ingress-nginx&quot;,
Name:&quot;ingress-nginx-controller&quot;,
UID:&quot;51060a85-d3a0-40de-b549-cf59e8fa7b08&quot;, APIVersion:&quot;v1&quot;,
ResourceVersion:&quot;733&quot;, FieldPath:&quot;&quot;}): type: 'Normal' reason: 'CREATE'
ConfigMap ingress-nginx/ingress-nginx-controller</p>
<p>I1129 15:00:53.112043       8 nginx.go:297] &quot;Starting NGINX process&quot;</p>
<p>I1129 15:00:53.112213       8 leaderelection.go:248] attempting to
acquire leader lease ingress-nginx/ingress-controller-leader...</p>
<p>I1129 15:00:53.112275       8 nginx.go:317] &quot;Starting validation
webhook&quot; address=&quot;:8443&quot; certPath=&quot;/usr/local/certificates/cert&quot;
keyPath=&quot;/usr/local/certificates/key&quot;</p>
<p>I1129 15:00:53.112468       8 controller.go:155] &quot;Configuration
changes detected, backend reload required&quot;</p>
<p>I1129 15:00:53.118295       8 leaderelection.go:258] successfully
acquired lease ingress-nginx/ingress-controller-leader</p>
<p>I1129 15:00:53.119467       8 status.go:84] &quot;New leader elected&quot;
identity=&quot;ingress-nginx-controller-54bfb9bb-f6gsf&quot;</p>
<p>I1129 15:00:53.141609       8 controller.go:172] &quot;Backend successfully
reloaded&quot;</p>
<p>I1129 15:00:53.141804       8 controller.go:183] &quot;Initial sync,
sleeping for 1 second&quot;</p>
<p>I1129 15:00:53.141908       8 event.go:282]
Event(v1.ObjectReference{Kind:&quot;Pod&quot;, Namespace:&quot;ingress-nginx&quot;,
Name:&quot;ingress-nginx-controller-54bfb9bb-f6gsf&quot;,
UID:&quot;54e0c0c6-40ea-439e-b1a2-7787f1b37e7a&quot;, APIVersion:&quot;v1&quot;,
ResourceVersion:&quot;766&quot;, FieldPath:&quot;&quot;}): type: 'Normal' reason: 'RELOAD'
NGINX reload triggered due to a change in configuration</p>
<p>I1129 15:04:25.107359       8 admission.go:149] processed ingress via
admission controller {testedIngressLength:1 testedIngressTime:0.022s
renderingIngressLength:1 renderingIngressTime:0s admissionTime:17.9kBs
testedConfigurationSize:0.022}</p>
<p>I1129 15:04:25.107395       8 main.go:101] &quot;successfully validated
configuration, accepting&quot; ingress=&quot;ingress-srv/default&quot;</p>
<p>I1129 15:04:25.110109       8 store.go:424] &quot;Found valid IngressClass&quot;
ingress=&quot;default/ingress-srv&quot; ingressclass=&quot;nginx&quot;</p>
<p>I1129 15:04:25.110698       8 controller.go:155] &quot;Configuration
changes detected, backend reload required&quot;</p>
<p>I1129 15:04:25.111057       8 event.go:282]
Event(v1.ObjectReference{Kind:&quot;Ingress&quot;, Namespace:&quot;default&quot;,
Name:&quot;ingress-srv&quot;, UID:&quot;6c15d014-ac14-404e-8b5e-d8526736c52a&quot;,
APIVersion:&quot;networking.k8s.io/v1&quot;, ResourceVersion:&quot;1198&quot;,
FieldPath:&quot;&quot;}): type: 'Normal' reason: 'Sync' Scheduled for sync</p>
<p>I1129 15:04:25.143417       8 controller.go:172] &quot;Backend successfully
reloaded&quot;</p>
<p>I1129 15:04:25.143767       8 event.go:282]
Event(v1.ObjectReference{Kind:&quot;Pod&quot;, Namespace:&quot;ingress-nginx&quot;,
Name:&quot;ingress-nginx-controller-54bfb9bb-f6gsf&quot;,
UID:&quot;54e0c0c6-40ea-439e-b1a2-7787f1b37e7a&quot;, APIVersion:&quot;v1&quot;,
ResourceVersion:&quot;766&quot;, FieldPath:&quot;&quot;}): type: 'Normal' reason: 'RELOAD'
NGINX reload triggered due to a change in configuration</p>
<p>I1129 15:06:11.447313       8 admission.go:149] processed ingress via
admission controller {testedIngressLength:1 testedIngressTime:0.02s
renderingIngressLength:1 renderingIngressTime:0s admissionTime:17.9kBs
testedConfigurationSize:0.02}</p>
<p>I1129 15:06:11.447349       8 main.go:101] &quot;successfully validated
configuration, accepting&quot; ingress=&quot;ingress-srv/default&quot;</p>
<p>I1129 15:06:11.449266       8 event.go:282]
Event(v1.ObjectReference{Kind:&quot;Ingress&quot;, Namespace:&quot;default&quot;,
Name:&quot;ingress-srv&quot;, UID:&quot;6c15d014-ac14-404e-8b5e-d8526736c52a&quot;,
APIVersion:&quot;networking.k8s.io/v1&quot;, ResourceVersion:&quot;1347&quot;,
FieldPath:&quot;&quot;}): type: 'Normal' reason: 'Sync' Scheduled for sync</p>
<p>I1129 15:06:11.449669       8 controller.go:155] &quot;Configuration
changes detected, backend reload required&quot;</p>
<p>I1129 15:06:11.499772       8 controller.go:172] &quot;Backend successfully
reloaded&quot;</p>
<p>I1129 15:06:11.500210       8 event.go:282]
Event(v1.ObjectReference{Kind:&quot;Pod&quot;, Namespace:&quot;ingress-nginx&quot;,
Name:&quot;ingress-nginx-controller-54bfb9bb-f6gsf&quot;,
UID:&quot;54e0c0c6-40ea-439e-b1a2-7787f1b37e7a&quot;, APIVersion:&quot;v1&quot;,
ResourceVersion:&quot;766&quot;, FieldPath:&quot;&quot;}): type: 'Normal' reason: 'RELOAD'
NGINX reload triggered due to a change in configuration</p>
</blockquote>

<h2><strong>AFTER COMPLETE RESET OF KUBERNETES THIS SOLUTION DOES NOT WORK!</strong></h2>
<p><strong>Will re-edit main question<br />
Leaving post for future use</strong></p>
<p>I solved the problem, or at least I think so.<br />
In addition to <a href="https://stackoverflow.com/questions/70115934/problem-with-deploying-blazor-server-app-to-kubernetes?noredirect=1#comment123954982_70115934">@moonkotte</a> suggestion to add the <code>ingressClassName: nginx</code> to <code>ingress-srv.yaml</code> I also changed the ingress port configuration so that it points to port <code>80</code> now.</p>
<p>Thanks to those changes using <code>scp.com</code> now correctly opens my app.
Also, using NodePort access I can visit my app using <code>localhost:30080</code>, where the 30080 port was set automatically (I removed the <code>nodePort</code> configuration line from <code>scanapp-np-srv.yaml</code>)</p>
<p>Why does the port in <code>ingress-srv.yaml</code> have to be set to 80 if <code>clusterIp</code> configuration states to set port <code>8080</code> to target port <code>80</code> - I don't know, I do not fully understand the inner workings of Kubernetes configuration - <strong>All explanations are more than welcome.</strong></p>
<p>Current state of main configuration files:</p>
<p><code>ingress-srv.yaml</code>:</p>
<pre class="lang-yaml prettyprint-override"><code>apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
  name: ingress-srv
  annotations:  
    nginx.ingress.kubernetes.io/affinity: &quot;cookie&quot;
    nginx.ingress.kubernetes.io/session-cookie-name: &quot;affinity&quot;
    nginx.ingress.kubernetes.io/session-cookie-expires: &quot;14400&quot;
    nginx.ingress.kubernetes.io/session-cookie-max-age: &quot;14400&quot;
spec:
  ingressClassName: nginx
  rules:
      - host: scp.com
        http:
            paths:
            - path: /
              pathType: Prefix
              backend:
                service:
                  name: scanapp-clusterip-srv
                  port:
                    number: 80
</code></pre>
<p><br />
<br />
<code>scanapp-np-srv.yaml</code>:</p>
<pre class="lang-yaml prettyprint-override"><code>apiVersion: v1
kind: Service
metadata:
    name: scanappnpservice-srv
spec:
    type: NodePort
    selector:
        app: scanapp
    ports:    
        - name: ui
          port: 8080
          targetPort: 80
        - name: scanapp0
          protocol: TCP
          port: 5000
          targetPort: 5000
        - name: scanapp1
          protocol: TCP
          port: 5001
          targetPort: 5001
        - name: scanapp5
          protocol: TCP
          port: 5005
          targetPort: 5005
</code></pre>
<p><br />
<br />
<code>scanapp-depl.yaml</code>:</p>
<pre class="lang-yaml prettyprint-override"><code>apiVersion: apps/v1
kind: Deployment
metadata:
    name: scanapp-depl
spec:
    replicas: 1
    selector:
        matchLabels:
            app: scanapp
    template:
        metadata:
            labels:
                app: scanapp
        spec:
            containers:
                - name: scanapp
                  image: scanapp:1.0
---
apiVersion: v1
kind: Service
metadata:
    name: scanapp-clusterip-srv
spec:
    type: ClusterIP
    selector:
        app: scanapp
    ports:
        - name: ui
          protocol: TCP
          port: 8080
          targetPort: 80
        - name: ui2
          protocol: TCP
          port: 8081
          targetPort: 443
        - name: scanapp0
          protocol: TCP
          port: 5000
          targetPort: 5000
        - name: scanapp1
          protocol: TCP
          port: 5001
          targetPort: 5001
        - name: scanapp5
          protocol: TCP
          port: 5005
          targetPort: 5005
</code></pre>
<p>Rest of files remained untouched.</p>
