Study. uk . com
  1. Home
  2. All questions
  3. Question 258

CKA study material · question 258 of 1000

How is a namespace-wide default-deny for ingress written?

  1. A namespace annotation setting deny-all
  2. A policy with policyTypes omitted entirely
  3. A policy with an ipBlock of 0.0.0.0/0 in except
  4. A policy with an empty podSelector and no ingress rules
Show the answer

Answer: D. A policy with an empty podSelector and no ingress rules

An empty podSelector selects every Pod in the namespace, and a policy with no rules permits nothing.

Source: Network Policies (Kubernetes) — The NetworkPolicy resource

Challenge yourself on this topic → Study as cards