Welcome to the Linux Foundation Forum!

LFS258 Lab 3.5 Step 6

Options

In this step, I picked up IP Address on both Control Plane Node and Worker Node and tried accessing the Application and it works.

Ex: http://32.190.184.218:31293/ and http://32.190.184.219:31293/

In a real-world application deployment scenario, which one should we be asking the end-users to make use of?

Best Answer

  • chrispokorni
    chrispokorni Posts: 2,165
    Answer ✓
    Options

    Hi @cvrupesh,

    Your observation is correct, a Service can be accessed through either of the cluster nodes. In a real world scenario, however, one would want to shield/protect the public IP addresses of cluster nodes behind a load balancer - this is when a LoadBalancer type Service can help.

    The Endpoints of a Service can be deleted manually, but it is best to allow the Service to delete its Endpoints when the kubectl delete service ... command is issued.

    Regards,
    -Chris

Answers

  • cvrupesh
    cvrupesh Posts: 6
    edited July 2022
    Options

    Also, if I delete the Service it automatically deletes the endpoints as well, what are the implications of doing this or should we always delete the endpoint first and then the service?

  • cvrupesh
    cvrupesh Posts: 6
    Options

    Understood, am I correct with my statement here? It will look like an External Load Balancer routing end-user requests to Control Plane & Work Nodes and then internally the Kube LoadBalancer routing it to one of the pods.

  • chrispokorni
    chrispokorni Posts: 2,165
    Options

    Hi @cvrupesh,

    The external Load Balancer will route a user request to one of the Worker Nodes, and then the Service will load balance/route the request to one of its endpoint Pods.

    Regards,
    -Chris

Categories

Upcoming Training