---
apiVersion: v1
kind: Service
metadata:
  name: k8s-stack-svc
  namespace: learn-k8s
  labels:
    app: k8s-stack
spec:
  type: NodePort
  selector:
    app: k8s-stack
  ports:
  - name: http
    protocol: TCP
    port: 80
    targetPort: 4000
# ---
# apiVersion: v1               
# kind: Service                
# metadata:                    
#   name: k8s-stack-lb        
#   namespace: learn-k8s
#   labels:                    
#     app: k8s-stack
# spec:                        
#   type: LoadBalancer         
#   selector:                  
#     app: k8s-stack
#   ports:                     
#   - name: http  
#     protocol: TCP             
#     port: 80
#     targetPort: 4000 