Recall & Review
beginner
What is a Kubernetes namespace?
A Kubernetes namespace is like a folder that helps organize and separate resources in a cluster. It allows you to group related resources together.
Click to reveal answer
beginner
How do you check the current namespace context in kubectl?
Use the command
kubectl config view --minify --output 'jsonpath={..namespace}' to see the current namespace set in your context.Click to reveal answer
beginner
What command switches the current namespace context to 'dev'?
Run
kubectl config set-context --current --namespace=dev to switch your current context to the 'dev' namespace.Click to reveal answer
beginner
Why is switching namespaces useful in Kubernetes?
Switching namespaces lets you work on different projects or environments without mixing resources. It keeps things organized and safe.
Click to reveal answer
beginner
How to list all namespaces in a Kubernetes cluster?
Use
kubectl get namespaces to see all namespaces available in your cluster.Click to reveal answer
Which command changes your current namespace to 'test'?
✗ Incorrect
The correct command is
kubectl config set-context --current --namespace=test to switch namespace context.What does a Kubernetes namespace help you do?
✗ Incorrect
Namespaces help organize and separate resources inside a Kubernetes cluster.
How do you see the current namespace your kubectl is using?
✗ Incorrect
Use
kubectl config view --minify --output 'jsonpath={..namespace}' to check the current namespace.What happens if you don’t specify a namespace in kubectl commands?
✗ Incorrect
If no namespace is specified, kubectl uses the 'default' namespace.
Which command lists all namespaces in your Kubernetes cluster?
✗ Incorrect
The command
kubectl get namespaces lists all namespaces.Explain how to switch your current kubectl context to a different namespace and why you might want to do this.
Think about how namespaces separate resources and how kubectl context controls where commands run.
You got /3 concepts.
Describe how to check which namespace your kubectl commands are currently using.
Look at the kubectl config and how it shows the active namespace.
You got /3 concepts.