0
0
Kubernetesdevops~5 mins

Creating custom namespaces in Kubernetes - Quick Revision & Summary

Choose your learning style9 modes available
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-name
Click 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'?
Akubectl apply namespace test-env
Bkubectl new namespace test-env
Ckubectl create namespace test-env
Dkubectl set namespace test-env
What is the default namespace in Kubernetes if none is specified?
Akube-system
Bdefault
Cpublic
Dglobal
Which YAML 'kind' is used to define a namespace?
ANamespace
BPod
CService
DDeployment
Namespaces in Kubernetes help to:
ASeparate cluster resources for different teams
BIncrease CPU speed
CStore container images
DManage network traffic
How do you apply a namespace YAML file named 'namespace.yaml'?
Akubectl delete -f namespace.yaml
Bkubectl create namespace.yaml
Ckubectl run namespace.yaml
Dkubectl apply -f namespace.yaml
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.