default
namespace when the cluster is created. This default namespace is used to create resources.kube-system
in which all the internal K8s resources are deployed.dev
and prod
namespaces, we can place a resource limit on the dev
namespace to prevent it from starving the prod
namespace.cluster.local
- domain name for the cluster
svc
- subdomain for service object
dev
- namespace
db-service
- service in the dev
namespace
Imperative command: k create namespace <namespace>
Declarative manifest file
apiVersion: v1
kind: Namespace
metadata:
name: dev
Command line: k apply -f pod.yml --namespace=dev
(untracked)
Config file (tracked): Use the namespace property
under the metadata section. This will always create the resource in the specified namespace.
metadata:
namespace: dev