Projects are isolated workspaces within organizations that contain your infrastructure resources. They provide namespace isolation, RBAC boundaries, and quota management for Networks, Workloads, Gateways, and other resources.
Project names must follow strict validation rules enforced by a ValidatingAdmissionPolicy at config/services/resourcemanager.miloapis.com/validation/project-name-validation-policy.yaml:1:
Length
Reserved Words
Format
Minimum: 6 charactersMaximum: 30 characters
# From validation policy- expression: "size(object.metadata.name) >= 6" message: "Project name is too short. Project names must be at least 6 characters long."- expression: "size(object.metadata.name) <= 30" message: "Project name is too long. Project names must not exceed 30 characters."
Project names cannot contain reserved words:
datum
# From validation policy- expression: "!object.metadata.name.contains('datum')" message: "Project name contains the reserved word 'datum' and cannot be used."
# List all resources in a projectkubectl get all -n project-production-env# List networks in projectkubectl get networks -n project-production-env# List workloads in projectkubectl get workloads -n project-production-env# List gateways in projectkubectl get gateways -n project-production-env
When working with kubectl, specify the project namespace:
# Set default namespace to projectkubectl config set-context --current --namespace=project-production-env# Or use -n flagkubectl get workloads -n project-production-env
Create an alias for convenience:
# Add to ~/.bashrc or ~/.zshrcalias kp='kubectl -n project-production-env'# Now you can use:kp get workloadskp apply -f workload.yaml
Projects count against organization quotas. When you create a project, a ResourceClaim is automatically created.Fromconfig/services/resourcemanager.miloapis.com/quota/claim-policies/claim-creation-policy.yaml:1:
# All resources for my-appkubectl get all -n project-production-env -l app=my-app# Only database tierkubectl get workloads -n project-production-env -l tier=database# All production resourceskubectl get all -n project-production-env -l environment=production
# Error: name too shortThe Project "prod" is invalid: metadata.name: Invalid value: "prod":Project name is too short. Project names must be at least 6 characters long.# Solution: Use longer namekubectl apply -f project.yaml # with name: production-env
# Error: reserved wordThe Project "datum-project" is invalid: metadata.name: Invalid value: "datum-project":Project name contains the reserved word 'datum' and cannot be used.# Solution: Remove reserved wordkubectl apply -f project.yaml # with name: my-project
# Verify you're in the correct namespacekubectl config view --minify | grep namespace# Switch to project namespacekubectl config set-context --current --namespace=project-production-env# Or use -n flagkubectl get workloads -n project-production-env