<p>Recently I am learning kubernetes.
I made a k8s cluster and deployed nginx and my app service on it, both nginx and the app service were exposed on port 80, I can only get to nginx default landing page when I try to access the external IP address on port 80, am I doing something wrong and how can I fix that, need help 🤨
I deploy nginx with this commands</p>
<pre><code>kubectl create deployment nginx --image=nginx:1.21.1
kubectl expose deployment nginx --external-ip=$MASTER_IP --port=80 --target-port=80
</code></pre>
<p>This is yam file for my service</p>
<pre><code>apiVersion: v1
kind: Service
metadata:
  name: node
  labels:
    app: node
    tier: backend
spec:
  type: LoadBalancer
  ports:
    - port: 80
      targetPort: 3000
  # Replace with the IP of your minikube node / master node
  externalIPs:
    - xxx.xxx.xxx.xxx
  selector:
    app: node
    tier: backend
</code></pre>

John Wu
<ol>
<li>Your first command created the deployment and POD</li>
<li>Your second command exposed the deployment on PORT 80.</li>
</ol>
<p>When you accessed the page on external-ip:port, the request went to pod via the service created at #2. Default page implies that web server is successfully installed and woking.</p>
