ExamGecko
Question list
Search
Search

List of questions

Search

Related questions











Question 23 - DCA discussion

Report
Export

The Kubernetes yaml shown below describes a networkPolicy.

Will the networkPolicy BLOCK this traffic?

Solution: a request issued from a pod lacking the tier: api label, to a pod bearing the tier: backend label

A.

Yes

Answers
A.

Yes

B.

No

Answers
B.

No

Suggested answer: A

Explanation:

The networkPolicy shown in the image is designed to block traffic from pods lacking the tier: api label, to pods bearing the tier: backend label. This is because the policy is set to matchLabels: tier: backend, and the ingress is set to - from: podSelector: matchLabels: tier: api. Therefore, any traffic that does not match these labels will be blocked.

Isolate containers with a user namespace | Docker Docs

The mnt namespace - Docker Cookbook - Second Edition

Container security fundamentals part 2: Isolation & namespaces

I hope this helps you understand the concept of networkPolicy and how it works with Kubernetes. If you have any other questions related to Docker, please feel free to ask me.

asked 08/11/2024
Nezha El Fakraoui
32 questions
User
Your answer:
0 comments
Sorted by

Leave a comment first