Files
nomad/website/content/docs/commands/namespace/list.mdx
Luiz Aoqui 4f7c38b2a7 node pools: namespace integration (#17562)
Add structs and fields to support the Nomad Pools Governance Enterprise
feature of controlling node pool access via namespaces.

Nomad Enterprise allows users to specify a default node pool to be used
by jobs that don't specify one. In order to accomplish this, it's
necessary to distinguish between a job that explicitly uses the
`default` node pool and one that did not specify any.

If the `default` node pool is set during job canonicalization it's
impossible to do this, so this commit allows a job to have an empty node
pool value during registration but sets to `default` at the admission
controller mutator.

In order to guarantee state consistency the state store validates that
the job node pool is set and exists before inserting it.
2023-06-16 16:30:22 -04:00

53 lines
1.2 KiB
Plaintext

---
layout: docs
page_title: 'Commands: namespace list'
description: |
The namespace list command is used to list namespaces.
---
# Command: namespace list
The `namespace list` command is used list available namespaces.
<Tip>
Visit the <a href="https://developer.hashicorp.com/nomad/tutorials/manage-clusters/namespaces">
Nomad Namespaces tutorial
</a> for more information.
</Tip>
## Usage
```plaintext
nomad namespace list [options]
```
The `namespace list` command requires no arguments.
If ACLs are enabled, this command requires a management ACL token to view all
namespaces. A non-management token can be used to list namespaces for which it
has an associated capability.
## General Options
@include 'general_options_no_namespace.mdx'
## List Options
- `-json` : Output the namespaces in their JSON format.
- `-t` : Format and display the namespaces using a Go template.
## Examples
List all namespaces:
```shell-session
$ nomad namespace list
Name Description
default Default shared namespace
api-prod Production instances of backend API servers
api-qa QA instances of backend API servers
web-prod Production instances of webservers
web-qa QA instances of webservers
```