Challenge - 5 Problems
Namespace Mastery
Get all challenges correct to earn this badge!
Test your skills under time pressure!
💻 Command Output
intermediate1:30remaining
Output of Namespace Creation Command
What is the output of running this command in a Kubernetes cluster?
kubectl create namespace dev-teamKubernetes
kubectl create namespace dev-teamAttempts:
2 left
💡 Hint
Think about what kubectl outputs when a namespace is successfully created.
✗ Incorrect
When you create a new namespace with kubectl, it confirms creation with 'namespace/ created'.
🧠 Conceptual
intermediate1:30remaining
Purpose of Kubernetes Namespaces
Which option best describes the purpose of creating custom namespaces in Kubernetes?
Attempts:
2 left
💡 Hint
Think about how namespaces help manage resources in a shared environment.
✗ Incorrect
Namespaces help separate and organize resources so teams or projects don't interfere with each other.
❓ Configuration
advanced2:00remaining
Correct YAML for Custom Namespace
Which YAML configuration correctly creates a namespace named
qa-environment?Attempts:
2 left
💡 Hint
Check the correct field name under metadata for naming namespaces.
✗ Incorrect
The field to name a namespace is 'name' under metadata. Underscores are not recommended in Kubernetes names.
❓ Troubleshoot
advanced2:00remaining
Troubleshooting Namespace Creation Error
You run
What is the most likely cause?
kubectl create namespace test-env but get this error:Error from server (Forbidden): namespaces "test-env" is forbidden: User "developer" cannot create resource "namespaces" in API group "" at the cluster scopeWhat is the most likely cause?
Attempts:
2 left
💡 Hint
Focus on the 'Forbidden' and 'cannot create resource' parts of the error.
✗ Incorrect
Creating namespaces requires cluster-wide permissions. The error shows the user lacks this permission.
🔀 Workflow
expert2:30remaining
Namespace Creation and Resource Deployment Order
You want to deploy an application in a new namespace called
staging. Which is the correct order of commands to achieve this?Attempts:
2 left
💡 Hint
You must create the namespace before deploying resources into it.
✗ Incorrect
First check existing namespaces, then create the new one, set context to it, and finally deploy resources.