BlackFriday 2024! Hurry Up, Grab the Special Discount - Save 25% - Ends In 00:00:00 Coupon code: SAVE25
Welcome to Pass4Success

- Free Preparation Discussions

Linux Foundation Exam CKS Topic 6 Question 66 Discussion

Actual exam question for Linux Foundation's CKS exam
Question #: 66
Topic #: 6
[All CKS Questions]

You can switch the cluster/configuration context using the following command: [desk@cli] $kubectl config use-context dev A default-deny NetworkPolicy avoid to accidentally expose a Pod in a namespace that doesn't have any other NetworkPolicy defined.

Task: Create a new default-deny NetworkPolicy nameddeny-networkin the namespacetestfor all traffic of type Ingress + Egress

The new NetworkPolicy must deny all Ingress + Egress traffic in the namespacetest.

Apply the newly createddefault-denyNetworkPolicy to all Pods running in namespacetest.

You can find a skeleton manifests file at /home/cert_masters/network-policy.yaml

Show Suggested Answer Hide Answer
Suggested Answer: A

Contribute your Thoughts:

Albert
25 days ago
Hold on, let me double-check the NetworkPolicy syntax. Ah, got it! This is a classic Kubernetes networking question. Time to put my skills to the test.
upvoted 0 times
Lajuana
8 days ago
User2
upvoted 0 times
...
Brandee
11 days ago
User1
upvoted 0 times
...
...
Matthew
1 months ago
Yes, following the steps in the reference link can guide us through the process.
upvoted 0 times
...
Kenneth
2 months ago
I agree, but the explanation provided with the manifest file is helpful.
upvoted 0 times
...
German
2 months ago
Haha, this is like a walk in the park. The trick is to remember that a default-deny NetworkPolicy is the way to go when there's no other policy defined. Just follow the steps and you're golden.
upvoted 0 times
Jeannetta
21 days ago
Following the steps makes it easy.
upvoted 0 times
...
Hui
27 days ago
Remember to deny all Ingress + Egress traffic in the namespace test.
upvoted 0 times
...
Valentin
28 days ago
Just create the new NetworkPolicy and apply it to the Pods.
upvoted 0 times
...
Oretha
1 months ago
I agree, default-deny NetworkPolicy is the key.
upvoted 0 times
...
...
Matthew
2 months ago
I think the question about creating a default-deny NetworkPolicy is tricky.
upvoted 0 times
...
Carlota
2 months ago
Easy peasy! Just run the `k get pods -n test --show-labels` command to see the pods, then create the NetworkPolicy YAML and apply it. Boom, job done!
upvoted 0 times
Annmarie
2 months ago
No problem, happy to help!
upvoted 0 times
...
Theodora
2 months ago
Thanks for the tip! I'll give that a try.
upvoted 0 times
...
...

Save Cancel