I'm new in Kubernetes and there are some doubts I have. I have setup a Kubernetes cluster that consists of one master/node and one node. I have deployed a very simple NodeJS-based app, using
Deployment kind with 2 replicas. Then, I have exposed it as a service by
kubectl expose deployment my-app --port=80.
Now, my services looks like:
root@sw-kubernetes01:~# kubectl get services NAME CLUSTER-IP EXTERNAL-IP PORT(S) AGE my-app 192.168.100.167 <none> 80/TCP 10m kubernetes 192.168.100.1 <none> 443/TCP 1h
Is it supposed that I should access to my app navigating to
http://192.168.100.167:? I'm getting a timeout error. Otherwise, how can I get the external IP to access to the service externally?
I know that if I declare the service as
type: NodePort, I can access my app using nodes IP, doesn't exist a way to auto-balance the load between pods?