Recall & Review
beginner
What is a Kubernetes namespace?
A Kubernetes namespace is a way to divide cluster resources between multiple users or teams. It helps organize and separate resources inside the same cluster.
Click to reveal answer
beginner
How do you create a custom namespace using kubectl?
You can create a custom namespace by running: <br>
kubectl create namespace your-namespace-nameClick to reveal answer
intermediate
What is the purpose of a namespace YAML file in Kubernetes?
A namespace YAML file defines the namespace as a resource in a declarative way. It can be applied with kubectl to create the namespace.
Click to reveal answer
beginner
Show a simple YAML example to create a namespace called 'dev-team'.
apiVersion: v1<br>kind: Namespace<br>metadata:<br> name: dev-team
Click to reveal answer
beginner
Why use namespaces in Kubernetes?
Namespaces help separate resources for different projects or teams, avoid name conflicts, and apply policies or limits per namespace.
Click to reveal answer
Which command creates a new namespace named 'test-env'?
✗ Incorrect
The correct command to create a namespace is 'kubectl create namespace '.
What is the default namespace in Kubernetes if none is specified?
✗ Incorrect
The default namespace is called 'default' where resources go if no namespace is specified.
Which YAML 'kind' is used to define a namespace?
✗ Incorrect
The kind 'Namespace' is used in YAML files to define a namespace resource.
Namespaces in Kubernetes help to:
✗ Incorrect
Namespaces separate resources logically for teams or projects inside the same cluster.
How do you apply a namespace YAML file named 'namespace.yaml'?
✗ Incorrect
Use 'kubectl apply -f ' to create or update resources from a YAML file.
Explain how to create a custom namespace in Kubernetes using both command line and YAML file.
Think about both direct commands and declarative YAML approach.
You got /3 concepts.
Describe why namespaces are useful in Kubernetes clusters.
Consider how namespaces help manage resources in a shared environment.
You got /4 concepts.