Jasmine W a9df6ac50b
docs: update structure (#8506)
- moved and renamed files/folders based on new structure
- updated docs navigation based on new structure
- moved CLI to top nav (created commands.jsx and commands-navigation.js)
- updated and added redirects
- updating to be consistent with standalone categories
- changing "overview" link in top nav to lead to where intro was moved (docs/intro)
- adding redirects for intro content
- deleting old intro folders
- format all data/navigation files
- deleting old commands folder
- reverting changes to glossary page
- adjust intro navigation for removal of 'vs' paths
- add helm page redirect
- fix more redirects
- add a missing redirect
- fix broken anchor links and formatting mistakes
- deleted duplicate section, added redirect, changed link
- removed duplicate glossary page
2020-09-01 11:14:13 -04:00

85 lines
1.9 KiB
Plaintext

---
layout: commands
page_title: 'Commands: Namespace'
sidebar_title: namespace
description: |
The namespace command provides management of Consul Enterprise namespaces.
---
# Consul Namespace
Command: `consul namespace`
<EnterpriseAlert />
The `namespace` command provides management of Consul Enterprise namespaces. This was added in Consul Enterprise 1.7.0.
If ACLs are enabled then a token with operator privileges may be required in order to use this command. Write
requests are forwarded to the leader in the primary datacenter. Therefore these commands can be run against
any agent in any datacenter.
## Usage
Usage: `consul namespace <subcommand>`
For the exact documentation for your Consul version, run `consul namespace -h` to view the complete list of subcommands.
```text
Usage: consul namespace <subcommand> [options] [args]
This command has subcommands for interacting with Consul Enterprise
Namespaces. Here are some simple examples. More detailed
examples are available in the subcommands or the documentation.
...
Subcommands:
create Create a Namespace
delete Delete a Namespace
list List all Namespaces
read Read a Namespace
update Update a Namespace
write Create or update a Namespace from its full definition
```
For more information, examples, and usage about a subcommand, click on the name
of the subcommand in the sidebar.
## Basic Examples
Create a Namespace
```shell-session
$ consul namespace create -name team1
```
Create or Update a Namespace from its full definition:
```shell-session
$ consul namespace write ns1.hcl
```
Read a Namespace:
```shell-session
$ consul namespace read ns1
```
List all Namespaces:
```shell-session
$ consul namespace list
```
Update a namespace
```shell-session
$ consul namespace update -name team1 -description "first namespace"
```
Delete a Namespace:
```shell-session
$ consul namespace delete team1
```