What is the main purpose of kube-system namespace?

6 views
Skip to first unread message

Qian Zhang

unread,
May 26, 2016, 10:17:27 AM5/26/16
to Containers at Google
Hi,

It seems "kube-system" namespace will be created by default, can anyone let me know what its main purpose is?
I see both kube-dns and dashboard should be created in "kube-system" namespace, but I do not know why. Is it because kube-dns and dashboard should be running on the master rather than on a node?

Rodrigo Campos

unread,
May 26, 2016, 11:04:00 AM5/26/16
to google-c...@googlegroups.com
No, it's running on nodes, just as other pods. Do "kubectl get pods --all-namespaces -o wide" to see in which nodes they are running.

Namespaces can have defaults for the resources and limits a pod can have, and as the number of RCs, etc. So it's better to have them in a k8s namespaces and not mixed with all the rest of the pods.

Also, it's more clear and readable, etc.

Matthias Rampke

unread,
May 26, 2016, 11:05:52 AM5/26/16
to google-c...@googlegroups.com
Hey,

as far as Kubernetes is concerned, it is not special.

The namespace is created when the cluster addons are deployed into the cluster; and some addons (namely, the logging ones) assume that it is so. Others, like DNS, don't care, for them it's just a namespace. If you really wanted to, you could modify all addons to use a different namespace, and never create kube-system, or even deploy each addon into its own namespace.[0]

Pods in that namespace are not scheduled differently.

/MR



[0] this is only true in self-managed clusters – in GKE for example they are managed for you and you can't modify them.


--
You received this message because you are subscribed to the Google Groups "Containers at Google" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-contain...@googlegroups.com.
To post to this group, send email to google-c...@googlegroups.com.
Visit this group at https://groups.google.com/group/google-containers.
For more options, visit https://groups.google.com/d/optout.



--
Matthias Rampke
Engineer

SoundCloud Ltd. | Rheinsberger Str. 76/7710115 Berlin, Germany | +49 173 6395215

Managing Director: Alexander Ljung Incorporated in England & Wales with Company No. 6343600 | Local Branch Office | AG Charlottenburg  | HRB 110657B

Qian Zhang

unread,
May 26, 2016, 10:12:17 PM5/26/16
to Containers at Google

    // NamespaceSystem is the system namespace where we place system components.

    NamespaceSystem string = "kube-system"


So the purpose of this namespace is to place system components. But I am not sure what are the system components, are kube-dns, dashboard and other add-ons system components?



Rodrigo Campos

unread,
May 26, 2016, 11:59:17 PM5/26/16
to google-c...@googlegroups.com


On Thursday, May 26, 2016, Qian Zhang <zhq5...@gmail.com> wrote:

    // NamespaceSystem is the system namespace where we place system components.

    NamespaceSystem string = "kube-system"


So the purpose of this namespace is to place system components. But I am not sure what are the system components, are kube-dns, dashboard and other add-ons system components?

Yes
Reply all
Reply to author
Forward
0 new messages