Key Concepts
Namespace
A logical boundary that isolates resources within a cluster.
Resource Quota
Limits on total resource consumption within a namespace.
Limit Range
Default and maximum resource constraints for containers.
System Namespace
Protected namespaces used by Kubernetes components.
Required Permissions
| Action | Permission |
|---|---|
| View namespaces | iam:project:infrastructure:kubernetes:read |
| Create/Edit namespaces | iam:project:infrastructure:kubernetes:write |
| Delete namespaces | iam:project:infrastructure:kubernetes:delete |
How to Create a Namespace
Choose a Template
Select a template based on your needs:
- Basic Namespace - Simple namespace with labels
- With Resource Quota - Includes CPU, memory, and object count limits
- With Limit Range - Includes default container resource constraints
Namespace names must be valid DNS labels: lowercase letters, numbers, and hyphens only. Maximum 63 characters.
How to Edit a Namespace
How to Delete a Namespace
System Namespaces
The following namespaces are protected and cannot be deleted:| Namespace | Purpose |
|---|---|
kube-system | Kubernetes system components |
kube-public | Publicly accessible cluster data |
kube-node-lease | Node heartbeat leases |
default | Default namespace for resources |
Troubleshooting
Namespace stuck in Terminating status
Namespace stuck in Terminating status
This usually indicates resources with finalizers that cannot complete:
- Check for stuck persistent volume claims
- Look for resources with deletion finalizers
- Consider manually removing finalizers as a last resort
Cannot create namespace
Cannot create namespace
- Verify you have write permission
- Check namespace name follows DNS label rules (lowercase, numbers, hyphens only)
- Ensure name is not already taken
Cannot delete namespace
Cannot delete namespace
- System namespaces (
kube-system,kube-public,kube-node-lease,default) cannot be deleted - Verify you have delete permission
Resource quota preventing deployments
Resource quota preventing deployments
- Check current usage against quota limits
- Either increase quota or reduce resource requests
- Use
kubectl describe resourcequota -n <namespace>to see usage
FAQ
What are resource quotas for?
What are resource quotas for?
Resource quotas limit total namespace consumption (CPU, memory, object counts). They prevent a single namespace from consuming all cluster resources.
What are limit ranges for?
What are limit ranges for?
Limit ranges set default resource requests/limits for containers that don’t specify them. They also enforce minimum and maximum constraints.
Can pods in different namespaces communicate?
Can pods in different namespaces communicate?
Yes, by default. Use the DNS name
<service>.<namespace>.svc.cluster.local. Apply NetworkPolicies to restrict cross-namespace traffic.How do I organize namespaces?
How do I organize namespaces?
Common patterns:
- By environment:
dev,staging,prod - By team:
team-a,team-b - By application:
app-frontend,app-backend