Welcome to the Linux Foundation Forum!

LFD259: Lab 7.12 error in yaml

Options
NargiT
NargiT Posts: 6
edited August 2019 in LFD259 Class Forum

When using LoadBalancer type, the nodePort not present thus the kubectl get svc shows the higher port 32000 but without the nodePort you get a random one

  - port: 80
    protocol: TCP
    nodePort: 32000 #<-- Missing line
    type: LoadBalancer #<-- Edit this line
    selector:
    example: second

Comments

  • serewicz
    serewicz Posts: 1,000
    Options

    Hello,

    Yes, if you do not declare the nodePort you will get a random assignment. Perhaps I am misunderstanding. What is the error you are getting?

    Regards,

  • NargiT
    Options

    Hello,

    The nodePort attribute is missing in the code snippet with LoadBalancer.

  • serewicz
    serewicz Posts: 1,000
    Options

    Ahh. Now I understand. Thank you. I will look into this issue.

    Kind regards,

Categories

Upcoming Training