📖 Scenario: You are managing a Kubernetes cluster for a small company. To keep resources organized, you want to create a custom namespace called project-alpha. Namespaces help separate resources like pods and services so teams can work independently.
🎯 Goal: Learn how to create a custom namespace in Kubernetes using a YAML configuration file and apply it with kubectl.
📋 What You'll Learn
Create a YAML file defining a namespace named project-alpha
Use kubectl to apply the YAML file and create the namespace
Verify the namespace was created by listing all namespaces
💡 Why This Matters
🌍 Real World
Namespaces help organize and separate resources in Kubernetes clusters, making it easier to manage multiple projects or teams.
💼 Career
Knowing how to create and manage namespaces is essential for Kubernetes administrators and DevOps engineers to maintain clean and secure cluster environments.
Progress0 / 4 steps
1
Create a YAML file for the namespace
Create a file named namespace.yaml with the exact content below to define a namespace called project-alpha: