Question 1 of 30
In a Kubernetes cluster, you are tasked with implementing network policies to control the traffic flow between different namespaces. You have two namespaces: `frontend` and `backend`. The `frontend` namespace contains a service called `web-app`, and the `backend` namespace contains a service called `database`. You want to ensure that the `web-app` can only communicate with the `database` service over port 5432, while preventing any other traffic from the `frontend` namespace to the `backend` namespace. Which network policy configuration would best achieve this requirement?
A network policy that allows ingress traffic to the `database` pod from the `web-app` pod on port 5432 and denies all other ingress traffic from the `frontend` namespace.
A network policy that allows all traffic from the `frontend` namespace to the `backend` namespace but restricts it to port 5432.
A network policy that denies all ingress traffic to the `database` pod and allows egress traffic from the `web-app` pod to the `database` pod on port 5432.
A network policy that allows ingress traffic to the `database` pod from any pod in the `frontend` namespace and allows all egress traffic from the `database` pod.

Preparing for VMWare 2V0-71.23 VMware Tanzu for Kubernetes Operations Professional? Now land the interview.

73% of qualified candidates get rejected because of weak resumes. Build an ATS-optimized, recruiter-ready resume in under 5 minutes - free to start.

Build My Resume Free