You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: content/en/docs/concepts/overview/working-with-objects/namespaces.md
+22-11Lines changed: 22 additions & 11 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -32,6 +32,26 @@ resources, such as different versions of the same software: use
32
32
{{< glossary_tooltip text="labels" term_id="label" >}} to distinguish
33
33
resources within the same namespace.
34
34
35
+
{{< note >}}
36
+
For a production cluster, consider _not_ using the `default` namespace. Instead, make other namespaces and use those.
37
+
{{< /note >}}
38
+
39
+
## Initial namespaces
40
+
41
+
Kubernetes starts with four initial namespaces:
42
+
43
+
`default`
44
+
: Kubernetes includes this namespace so that you can start using your new cluster without first creating a namespace.
45
+
46
+
`kube-node-lease`
47
+
: This namespace holds [Lease](/docs/reference/kubernetes-api/cluster-resources/lease-v1/) objects associated with each node. Node leases allow the kubelet to send [heartbeats](/docs/concepts/architecture/nodes/#heartbeats) so that the control plane can detect node failure.
48
+
49
+
`kube-public`
50
+
: This namespace is readable by *all* clients (including those not authenticated). This namespace is mostly reserved for cluster usage, in case that some resources should be visible and readable publicly throughout the whole cluster. The public aspect of this namespace is only a convention, not a requirement.
51
+
52
+
`kube-system`
53
+
: The namespace for objects created by the Kubernetes system.
54
+
35
55
## Working with Namespaces
36
56
37
57
Creation and deletion of namespaces are described in the
@@ -56,16 +76,7 @@ kube-public Active 1d
56
76
kube-system Active 1d
57
77
```
58
78
59
-
Kubernetes starts with four initial namespaces:
60
79
61
-
*`default` The default namespace for objects with no other namespace
62
-
*`kube-system` The namespace for objects created by the Kubernetes system
63
-
*`kube-public` This namespace is created automatically and is readable by all users (including those not authenticated). This namespace is mostly reserved for cluster usage, in case that some resources should be visible and readable publicly throughout the whole cluster. The public aspect of this namespace is only a convention, not a requirement.
64
-
*`kube-node-lease` This namespace holds [Lease](/docs/reference/kubernetes-api/cluster-resources/lease-v1/)
65
-
objects associated with each node. Node leases allow the kubelet to send
66
-
[heartbeats](/docs/concepts/architecture/nodes/#heartbeats) so that the control plane
67
-
can detect node failure.
68
-
69
80
### Setting the namespace for a request
70
81
71
82
To set the namespace for a current request, use the `--namespace` flag.
@@ -106,7 +117,7 @@ By creating namespaces with the same name as [public top-level
106
117
domains](https://data.iana.org/TLD/tlds-alpha-by-domain.txt), Services in these
107
118
namespaces can have short DNS names that overlap with public DNS records.
108
119
Workloads from any namespace performing a DNS lookup without a [trailing dot](https://datatracker.ietf.org/doc/html/rfc1034#page-8) will
109
-
be redirected to those services, taking precedence over public DNS.
120
+
be redirected to those services, taking precedence over public DNS.
110
121
111
122
To mitigate this, limit privileges for creating namespaces to trusted users. If
112
123
required, you could additionally configure third-party security controls, such
@@ -116,7 +127,7 @@ to block creating any namespace with the name of [public
0 commit comments