It seems there is 2 ways to logically group pods, which are:
What are exactly the differences and use cases?
Let's begin with a cluster which consists a number of nodes(Virtual Machines or Physical Machines ). Now We will divide our cluster in a logical way
Namespaces is a virtual cluster or a logical cluster. It helps us to organise projects or environments (development, testing, staging, and production environments). By using Namespaces, You can limit the quota to each namespace for resources utilization. You want to be sure that production environment has more than enough resources, so it won't starve to death.
Labels is a powerful concept in Kubernetes.It's a key-value pair which is assigned to kubernetes resources such as Pods, RepicaSet, Node etc. It is used to organise pods.for instance, ReplicaSet or Service can select the pods in a k8s cluster by using labels and perform an operation on them such as increasing the number of pods.
I have attached the link for further reading labels and Selector and Namespaces
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With