Skip to content

Latest commit

 

History

History
90 lines (53 loc) · 1.55 KB

26-Practice-Test-Network-Policies.md

File metadata and controls

90 lines (53 loc) · 1.55 KB

Practice Test - Network Policies

Solutions to practice test - network policies

  • Run the command 'kubectl get networkpolicy'

    $ kubectl get networkpolicy
    
  • Run the command 'kubectl get networkpolicy'

    $ kubectl get networkpolicy
    
  • Run the command 'kubectl get networkpolicy' and look under pod selector

    $ kubectl get networkpolicy
    
  • Run the command 'kubectl describe networkpolicy' and look under PolicyTypes

    $ kubectl describe networkpolicy
    
  • What is the impact of the rule configured on this Network Policy?

    Traffic from internal to payroll pod is blocked
    
  • What is the impact of the rule configured on this Network Policy?

    Internal pod can access port 8080 on payroll pod
    
  • Access the UI of these applications using the link given above the terminal.

  • Only internal applications can access payroll service

  • Perform a connectivity test using the User Interface of the Internal Application to access the 'external-service' at port '8080'.

    Successful
    
  • Answer file located at /var/answers/answer-internal-policy.yaml

    $ kubectl create -f /var/answers/answer-internal-policy.yaml