KCNA · Question #77
Which of the following sentences is true about namespaces in Kubernetes?
The correct answer is C. The default namespace exists when a new cluster is created. Kubernetes namespaces provide a mechanism for isolating resources within a cluster, and a default namespace is always pre-created for general use.
Question
Which of the following sentences is true about namespaces in Kubernetes?
Options
- AYou can create a namespace within another namespace in Kubernetes.
- BYou can create two resources of the same kind and name in a namespace.
- CThe default namespace exists when a new cluster is created.
- DAll the objects in the cluster are namespaced by default.
How the community answered
(38 responses)- A3% (1)
- B8% (3)
- C87% (33)
- D3% (1)
Why each option
Kubernetes namespaces provide a mechanism for isolating resources within a cluster, and a `default` namespace is always pre-created for general use.
Namespaces in Kubernetes are flat; you cannot create a namespace within another namespace.
You cannot create two resources of the same kind and name within the same namespace, as resource names must be unique within a namespace.
When a new Kubernetes cluster is created, it comes pre-configured with several namespaces, including the `default` namespace, `kube-system` for Kubernetes system components, `kube-public`, and `kube-node-lease`.
Not all objects in a cluster are namespaced by default; cluster-scoped resources like Nodes, PersistentVolumes, and Namespace objects themselves are not associated with any namespace.
Concept tested: Kubernetes Namespaces
Source: https://kubernetes.io/docs/concepts/overview/working-with-objects/namespaces/
Topics
Community Discussion
No community discussion yet for this question.