A Kubernetes Namespace logically organizes resources inside a cluster. Assigning a Namespace to a Pod, Deployment, Service, or other resource lets you group and filter resources by project, team, or environment. section 8.1.3 section 8.4.4
Namespaces are useful for:
- Keeping separate projects or internal teams organized. section 8.1.3
- Separating application environments such as production, preproduction, development, and research. section 8.1.3
- Filtering resources with kubectl, including by using the -n flag. section 8.4.4
Isolating a Redis deployment
Create a Namespace manifest, then apply it before creating the Redis resources: apiVersion: v1 kind: Namespace metadata: name: rk8s-redis Run kubectl apply -f redis-db/1-namespace.yaml. A StatefulSet and ClusterIP Service can declare namespace: rk8s-redis. Compare resources with kubectl get pods -n rk8s-redis and kubectl get pods -n default: the commands show resources from different Namespaces. section 8.4.4




