I’m new to docker and K8s, although i have taken some courses to get myself comfortable.
I have application running inside docker containers and can be reached via dns www.example-dns.com.
Now for HA, we want to move to either swarm or k8s cluster. In either of these, the application can be reached from all
the nodes participating in the cluster.
How can i configure my cluster in such a way that the application can be reached only from master IP/DNS and deny access
via IPs of workers?
I came across load balancer in K8s but it is for public cloud platforms or am i wrong?
Is there a way i can setup local loadbalancer and my app can be reached via it?
I’m confused. Kindly help!!
You can use NetworkPolicies to setup such behavior, but your network backend needs to enforce them, this can be achieved using Calico for instance. Most basic deployments of kubernetes will not support this sort of policy enforcement out of the box.