In the final quiz of the "Kubernetes Deep Dive" course there is a question:
You are deploying an application that exposes an API. You need other applications on your internal corporate LAN to be able to query the API. These applications will not be running on your Kubernetes cluster. Which type of Kubernetes Service would you deploy to make this work?
My – incorrect – answer was "LoadBalancer"
Answer pointed as correct was "NodePort"
Maybe II don’t get this question correctly, but what if cluster has 5 nodes, and 2 of them suddenly go down? How would these "other applications on your internal corporate LAN" detect that nodes went down and switch to other nodes?
As I understand:-
Port → to access within cluster using ClusterIP
NodePort → To access from outside of cluster, using nodeIP, within LAN.
LoadBalancer → To access from Public.
So, Nodeport answer is correct, as question talks about LAN.
I agree with you.. Since there is no External access mentioned in the question, NodePort seems to be the correct. Usually in this kind of tech tests, you need to remember ( "Ok there is "2" correct here), let me check witch is the cheaper, os faster that meet the question requirements… In this case NodePort
I had the same answer – which I think is more correct although NodePort would also work. I think the failure case you point out would not be solved by NodePort but would by LoadBalancer. FYI – I’m not a K8S expert by any means…