Welcome to the Linux Foundation Forum!

LFS258 Exercise 9.2: Configure a NodePort

Options

When I do  kubectl -n accounting expose deployment nginx-one --type=NodePort --name=service-lab

The NodePort Service is exposed using 10.96.252.250.

admin_isergei_altostrat_com@cp:~$ kubectl get service -n accounting
service-lab  NodePort  10.96.252.250      80:31154/TCP  23h

Where does this 10.96.252.250 is coming from and how do I expose the service using the Public IP address of the node? Because in the lab description it is mentioned that I should be able to access the nginx using the public IP of the node.

From the lab:
"Using the browser on your local system, use the public IP address you use to SSH into your node and the port. You should still see the nginx default page."

Comments

  • seignatev
    seignatev Posts: 3
    Options

    Ah. Nevermind. I figured it.

    I should have used : in the browser to make it work.

    And the command to modify the spec in case I need to change the port number would be:
    "kubectl edit service -n accounting service-lab"

Categories

Upcoming Training