Namespaces in Kubernetes
A namespace is a virtual cluster in our Kubernetes cluster. We can configure a namespace to have a resource quota, such as the maximum number of pods. This can be done by creating a
ResourceQuota object and setting the
namespace property in
metadata to the name of the namespace.
apiVersion: v1 kind: ResourceQuota metadata: name: name-of-quota namespace: name-of-namespace
When one creates a Service in a namespace, it creates a DNS entry in a specific format (below).
svc refers to Service, while
cluster.local is the default domain name of the Kubernetes cluster.
A Kubernetes object in a namespace can access a Service in the same namespace just by referring the name of the Service, but to access a Service in another namespace, we must refer the entire DNS entry.