DevOpsLesson
DevOpsLesson

Free, comprehensive DevOps tutorials and learning roadmaps. Master Docker, Kubernetes, CI/CD, and more.

Stay Updated

Get notified about new tutorials and features.

Tutorials

  • What is DevOps?
  • Docker Tutorial
  • Terraform Tutorial
  • CI/CD Pipeline
  • All Tutorials

Roadmaps

  • DevOps Engineer
  • Cloud Engineer
  • SRE Path
  • All Roadmaps

Company

  • About Us
  • Blog
  • Contact
  • Privacy Policy
  • Terms of Service

© 2026 DevOpsLesson. All rights reserved.

DOCKERKUBERNETESTERRAFORMAWSCI/CDLINUXGITDEVOPS ROADMAPCLOUD ROADMAPSRE ROADMAPGIT CHEATSHEETDOCKER CHEATSHEETK8S CHEATSHEETTF CHEATSHEETLINUX CHEATSHEETDOCKERFILE LINTERYAML VALIDATORCRON PARSERREGEX TESTER

Kubernetes Tutorial

Introduction to Kubernetes
Kubernetes Architecture
Installing Kubernetes
kubectl Basics
Kubernetes Pods
Kubernetes Deployments
Kubernetes Services
ConfigMaps and Secrets
Kubernetes Storage
Kubernetes Namespaces
Kubernetes Resource Management
Helm for Kubernetes
Kubernetes Monitoring

Kubernetes Namespaces

PreviousPrev
Next

Organize cluster resources with namespaces, understand built-in namespaces, and apply quotas and limits for multi-team environments.

What Are Namespaces?

Namespaces are a way to divide cluster resources into logical spaces. They help separate teams, environments, or applications.

Built-in Namespaces

NamespacePurpose
defaultGeneral-purpose namespace if you do not specify one
kube-systemCore Kubernetes system components
kube-publicPublicly readable cluster information in some setups
kube-node-leaseNode heartbeat lease objects

Create a Namespace

kubectl create namespace dev

Namespace YAML with ResourceQuota

apiVersion: v1
kind: Namespace
metadata:
  name: team-a
---
apiVersion: v1
kind: ResourceQuota
metadata:
  name: team-a-quota
  namespace: team-a
spec:
  hard:
    requests.cpu: "4"
    requests.memory: 8Gi
    limits.cpu: "8"
    limits.memory: 16Gi
    pods: "20"

Scope Commands with -n

kubectl get pods -n team-a
kubectl get services -n kube-system

Cross-Namespace DNS

A service in another namespace can be addressed by a fuller DNS name such as:

api.team-a.svc.cluster.local

LimitRange Mention

A LimitRange can set default resource requests and limits inside a namespace, helping keep workloads predictable.

When to Use Multiple Namespaces

Use multiple namespaces when you want:

  • separation between teams
  • environment boundaries such as dev and prod
  • quota and policy isolation
  • simpler RBAC scoping

Namespaces are like departments inside the same company building. Everyone shares the building, but rooms, budgets, and permissions can differ.

Exercise

Built-in Namespace

Which built-in namespace commonly holds core Kubernetes system components?

Exercise

Quota Purpose

Why would you use a ResourceQuota in a namespace?

PreviousPrev
Next

Continue Learning

Kubernetes Storage

Compare ephemeral and persistent storage options and understand how Kubernetes separates application pods from durable data.

15 min·Easy

Persistent Volumes and PersistentVolumeClaims

Understand the PV and PVC model, access modes, reclaim policies, and how a pod mounts durable storage through a claim.

22 min·Easy

Kubernetes StorageClasses

Use StorageClasses for dynamic provisioning and learn how provisioners, reclaim policies, and volume binding modes affect storage behavior.

20 min·Easy

Explore Related Topics

Do

Docker Tutorials

Build the containers Kubernetes orchestrates

Te

Terraform Tutorials

Provision Kubernetes clusters as code

Try the Tool

YAML Validator

Validate Kubernetes manifests and any YAML files instantly.

On This Page

What Are Namespaces?Built-in NamespacesCreate a NamespaceNamespace YAML with ResourceQuotaScope Commands with `-n`Cross-Namespace DNSLimitRange MentionWhen to Use Multiple Namespaces