Welcome to the Linux Foundation Forum!

Wrong Indentation for NetworkPolicy example


During the reading of the course I found that there is an issue with the indentation of the NetworkPolicy example (Security page 11) : the “egress” block should be at the same level as “ingress” block :



Best Regards,


Best Answer


  • Thanks @fcioanca for this quick fix. But syntax it's still not valid : the following element have wrong indentation:

    • port
    • namespaceSelector
    • podSelector
      in the ingress section.
      There is also no dash in front of selectors. They are part of the NetworkPolicyPeer definition
  • Hello @fcioanca, can you double check the indentation of the slide "Network Security Policy Example", it's still not valid.

  • fcioanca
    fcioanca Posts: 1,756

    Hi @Vampouille

    The indentation matches the current Kubernetes documentation.

    Thank you,

  • Sorry but it's not the same indentation. I'm talking about the page "Security/Network Security Policy Example" with :

    for example, "ports" and "egress" are at the same level and this is not valid if you compare with the k8s doc :

  • fcioanca
    fcioanca Posts: 1,756

    This is the page in the live course, and it looks different than what you posted:

  • @fcioanca Thanks for the screenshot, it explains why we don't understand each other ;-) This is not the same training. Your screenshot is from LFS258 (CKA) and mine is from LFS259 (CKAD). I did not notice that there is also a part regarding network policies in LFS258.

  • fcioanca
    fcioanca Posts: 1,756

    Hi @Vampouille , should be good now (I hope :) ).

  • @fcioanca Perfect, thanks :-)


Upcoming Training