<p>I have created a Kubernetes cluster in the <a href="https://upcloud.com/community/tutorials/deploy-kubernetes-using-kubespray/" rel="nofollow noreferrer">cloud- using this tutorial</a> and deployed [to the cluster] a backend application called <code>chatapp</code> from the Docker private registry. Since there is no option to include service type as <code>LoadBalancer</code>, I had to restore to <code>NodePort</code> type.
Here is the <code>chatapp-deployment.yml</code> file for reference:</p>
<pre><code>apiVersion: v1
kind: Service
metadata:
  name: chatapp
spec:
  selector:
    app: chatapp
  ports:
  - protocol: &quot;TCP&quot;
    port: 6443
    targetPort: 3000
  type: NodePort
  externalIPs:
  - A.B.C.D

---
apiVersion: apps/v1
kind: Deployment
metadata:
  name: chatapp
  labels:
    app: chatapp
spec:
  replicas: 2
  selector:
    matchLabels:
      app: chatapp
  template:
    metadata:
      labels:
        app: chatapp
    spec:
      imagePullSecrets:
      - name: regsecret
      containers:
      - name: chatapp
        image: sebastian/chatapp
        imagePullPolicy: Always
        command: [&quot;/bin/sh&quot;]
        args: [&quot;-c&quot;, &quot;while true; do echo hello; sleep 10;done&quot;]
        ports:
          - containerPort: 3000
</code></pre>
<p><strong>Note:</strong> I removed the external IP for security reasons.</p>
<p>I had to assign external IP manually since I couldn't set-up <code>LoadBalancer</code> as service type. Whenever I try accessing <code>http://A.B.C.D:6443</code>, I get the following:</p>
<pre><code>Client sent an HTTP request to an HTTPS server.
</code></pre>
<p>I went through this <a href="https://stackoverflow.com/questions/61017106/client-sent-an-http-request-to-an-https-server">link</a> but couldn't fix my issue with it. The external IP I have used is from the <code>master-o</code>.</p>
<p>While trying to access it with <a href="https://A.B.C.D:6443" rel="nofollow noreferrer">https://A.B.C.D:6443</a>, I get the following <code>403</code> message:</p>
<pre><code>{
  &quot;kind&quot;: &quot;Status&quot;,
  &quot;apiVersion&quot;: &quot;v1&quot;,
  &quot;metadata&quot;: {
    
  },
  &quot;status&quot;: &quot;Failure&quot;,
  &quot;message&quot;: &quot;forbidden: User \&quot;system:anonymous\&quot; cannot get path \&quot;/\&quot;&quot;,
  &quot;reason&quot;: &quot;Forbidden&quot;,
  &quot;details&quot;: {
    
  },
  &quot;code&quot;: 403
</code></pre>
<p>How can I authorize access to my cluster? Any feedbacks and suggestions would be appreciated.</p>

<p>Your request has reached the k8s api-server at 6443 instead of your chatapp. To access your chatapp; first retrieve the nodePort number: <code>kubectl describe service chatapp | grep -i nodeport</code>, then use this # to access your app at <code>http://a.b.c.d:&lt;nodePort&gt;</code></p>
